Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Source Control showing multiple Working Copies

Xcode is showing multiple working copies:

Working Copies myProject - master myProject_olderRepo myProject_originalRepo 

The second two are greyed out.

The original code was cloned in Sourcetree from the repo of a previous owner. Not knowing how to move the files into a new repo, I simply copied locally the entire project directory, and started work on them. Then I copied the contents of that reworked project directory into a folder linked to a repo to which others have access. When they clone the repo they get compile errors because modules (the two older repos) are missing.

I have almost no experience of source control and Bitbucket et al, so I humbly ask forgiveness for anything completely stupid that I am doing.

How do I remove those older working copies from Xcode's source control? Or is there some other way that others can then clone and compile the project without errors?

like image 772
HenryRootTwo Avatar asked Dec 17 '14 00:12

HenryRootTwo


People also ask

Should I commit Xcodeproj?

For example, the Xcodeproj is actually a bundle of more folders and files! Teams need to share the project's configurations, but people don't want to invest full days in solving stupid conflicts on autogenerated files. So what is the solution? Do not commit these files!

What is fetch changes in Xcode source control?

fetch just updates your remote tracking branch. This allows you to inspect what was pulled down from the server before integrating those changes with what you have locally. You now either merge or rebase those changes to your local branch (if it exists).

What is source control in Xcode?

Overview. Source control is the practice of tracking and managing changes to your code. Manage your Xcode project with source control to keep a rich history of the changes you make, and collaborate on code faster and more effectively. Xcode simplifies source control management with its built-in support for Git.

How do I push code from Xcode to github?

Push your projectGo to Source Control in Xcode and select Projectname -- master, then Configure... In the Address field, paste the Git clone URL for your repo copied in the previous step. Select Add Remote, then select Done to finish creating the origin remote for your local Git repo.


1 Answers

Solved this by deleting xccheckout file under

ProjectName.xcodeproj > project.xcworkspace > xcshareddata 

This had contained references to the previous repos.

like image 139
HenryRootTwo Avatar answered Oct 21 '22 12:10

HenryRootTwo