I have an iPad app with several versions; I'm currently working on v2.1.1, which I checked out from the remote repos. This is what I see when I click on Source Control. What does this mean and how do I fix it?
-
Go to the command line and `cd` to the project directory and type `git branch` and post back what it says. – trojanfoe Jul 12 '14 at 19:23
-
iMac-2:SalonBook rolfmarsh$ git branch * 2.1.1 – SpokaneDude Jul 12 '14 at 19:27
-
Apparently not... when I look at the remote, there is a Master, with several branches under it... but on the local (using SourceTree), I don't see a master... – SpokaneDude Jul 12 '14 at 19:34
-
No sure what's happened but if the remote is up-to-date then I would rename the existing project and re-clone. – trojanfoe Jul 12 '14 at 19:35
-
"clone" or "checkout"? – SpokaneDude Jul 12 '14 at 19:39
-
1Clone as is in `git clone http://whatever.com/myrepo.git`. – trojanfoe Jul 12 '14 at 19:40
-
what's the difference between that and this: git fetch && git checkout 2.1.1 – SpokaneDude Jul 12 '14 at 19:42
3 Answers
@Piyush has given a correct answer. However, I recently discovered one condition which needs to be satisfied in order for this approach to work.
Before removing references to your old repo in the ".xcscmblueprint" file you should ensure that you have no files in your project which were imported from some other project without copying. If this is the case Xcode will regenerate ".xcscmblueprint" file and will reference the second repo again because some of your files reside in folders which belong to the second repo.
All you need to do is to ensure that you copy such files into your project and not simply reference them. Once this is ensured perform all steps described by @Piyush and the reference to the second repo will be removed.

- 6,163
- 1
- 24
- 59
You can delete those unwanted working copies under
ProjectName.xcodeproj > project.xcworkspace > xcshareddata
They are listed as .xccheckout files.

- 13,044
- 6
- 50
- 73
In my case I had an explicit workspace (in folder <workspace_name>.xcworkspace
). When I looked inside the workspace folder, I found two files in the xcshareddata
folder: <worspace_name>.xccheckout
and <worspace_name>.xcscmblueprint
. In my case the file with extension .xccheckout
seemed to be all right, but I had to clean up the file with extension .xcscmblueprint
by removing references to the unwanted working copy name. See Before/After: https://gist.github.com/mczenko/b7d5a1e52e167f4299e1

- 401
- 3
- 11