Missing "add existing items" in .cyprj and .cywrk files

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Etry
Level 1
Level 1
First solution authored First reply posted First question asked

I am using PSoC Creator 4.3 and my team uses git for version control. On my projects, whenever I "add existing item" or "remove from 'project_name'" these changes are made in project_name.cydsn/workspace_name-000.cywrk.User_Name. This file is untracked, as we don't want per user files for our entire team.

I know that these changes can be tracked as our source only contains our code, headers, top design and one .cyprj file and one .cywrk file. When I download our source to a fresh computer it has the same several files already included in the project including the one I want to remove and not including the new file I made. The file I want to remove was removed from our source, but it is linked as missing in the workspace explorer until I remove it. Similarly, the file I created was added to our source, but it is completely missing from the workspace explorer until I add it. To summarize, the issue is when I remove and add these files from the workspace explorer, those changes are saved to a per user file and not the global project. How can I save it to the global project?

Your help is greatly appreciated!

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Etry
Level 1
Level 1
First solution authored First reply posted First question asked

It's very strange but it seems the problem was with my git. A coworker was able to make changes to the files in the workspace and it changed correctly in the project_name.cyprj file and not his user file. When I tried to pull the change, git notified me that I would be overwriting my project_name.cyprj file, but git status told me that no files were changed (see attached screenshot). The solution was a git reset --hard and then I could pull the changes and additionally I could remove or add files to my workspace and the corresponding project_name.cyprj was updated correctly. Nothing was added or removed from our tracked files, the only thing that was modified on git was a hard reset. 

Nevertheless, I appreciate the response @Rakshith This was an unexpected problem and the cause on git's side is still unknown, but fixed.

View solution in original post

0 Likes
3 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @Etry

The issue that you are facing is because PSoC Creator maintains its file directory which is different from the system explorer file directory. Unfortunately, we cannot work around this issue. This Knowledge-based article should provide further details regarding version control in PSoC Creator - Revision Control for PSoC® Creator™ Projects - KBA86358

Thanks and Regards,
Rakshith M B
0 Likes
lock attach
Attachments are accessible only for community members.
Etry
Level 1
Level 1
First solution authored First reply posted First question asked

It's very strange but it seems the problem was with my git. A coworker was able to make changes to the files in the workspace and it changed correctly in the project_name.cyprj file and not his user file. When I tried to pull the change, git notified me that I would be overwriting my project_name.cyprj file, but git status told me that no files were changed (see attached screenshot). The solution was a git reset --hard and then I could pull the changes and additionally I could remove or add files to my workspace and the corresponding project_name.cyprj was updated correctly. Nothing was added or removed from our tracked files, the only thing that was modified on git was a hard reset. 

Nevertheless, I appreciate the response @Rakshith This was an unexpected problem and the cause on git's side is still unknown, but fixed.

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @Etry

Thank you for providing the update on the thread! 

Thanks and Regards,
Rakshith M B
0 Likes