Reputation: 608
I have been working on an Xcode project (that is installed via adhoc installation, for internal use at my company) for a few years now and I had enabled source control since day 1. All was working perfectly until when iOS 8 was released, i decided to convert it into iOS 8 while leaving a backup on the project as it is. So, I renamed the original folder to bimpd_old and started modifying the new project. I am a beginner in git, and I didn't know that doing this might corrupt source control. After doing so (and while still working on both projects) my source control won't commit anymore complaing that the project is not under version control.
I tried many solutions on the internet that suggest deleting .svn/.git folders, disabling and reenabling source control, run git init, add *, commit.. I also tried deleting the bimPd.xccheckout EDIT: I already tried the solution from: How to disassociate working copy of an Xcode 5 project from SVN server that died with no success. Probably that solution works only for Xcode5 while my issue is in Xcode 6.3
I just want to lose all version history, detach/delete all working copies, and start new version control starting today.
How can I achieve that?
Notes:
Upvotes: 4
Views: 8324
Reputation: 4323
I had this problem where two remotes appeared when I pressed command 2 in Xcode 10.2.1.
The trick was selecting one of the remotes, then displaying the Inspectors and selecting the Source Control Inspector. It indicated a working copy that was a in a completely different project folder on my disk. This happened with a clone from git in the terminal. The other remote showed the working copy of the expected folder. Somehow, Xcode was finding a reason to find or resolve something to the other folder.
After messing around with Xcode preferences, trying multiple clones, simply renaming the folder of the other working copy to something else solved the problem. Xcode no longer magically tried to add that repo and that working copy to a completely separate clone of the project.
None of the other solutions of looking for DVTSourceControl files, xccheckout, looking in Xcode workspace or project contents, or deleting the Derived Data, lead to the answer. Simply quitting Xcode, locating the other working copy on disk and renaming it and reopening Xcode solved the problem.
Who knows what was happening.
Upvotes: 0
Reputation: 890
I had to delete the dreaded Derived Data folder after running pod install.
I was using cocoa pods. My commit on the Xcode client was a mess despite my gitHub being just fine.
pod install
in my directory with podfile~/Library/Developer/Xcode/DerivedData
Upvotes: 0
Reputation: 31
Many of these solutions mention deleting the .git
folder - it should be noted that this action will delete any stashes and local branches you may have in reserve.
I learned this the hard way... and this issue with the extra root-repo showing wasn't even resolved for me! Terrible outcome.
(Apologies, I currently do not have the 50 reputation to simply comment on an answer!)
Upvotes: 1
Reputation: 1234
Remove all unrequited repo from following location
DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey
You can remove all unrequited working copy using following linked steps. Multiple Working Copy
Upvotes: 2
Reputation: 3136
I believe @david72 has the correct answer. (I didn't find @dandoonian "order of steps is crucial" to be the case for me.)
My problem was my project was using an .xcworkspace. So for me, the path to find the file was:
projectname.xcworkspace(show package contents) -> xcshareddata -> projectname.xcscmblueprint
I edited that file (took out the "working copies" I didn't need any more), re-saved, and restarted xCode. Voila.
Upvotes: 3
Reputation: 608
Just to summarize what solved the problem using @david72's help (in one of the comments)
P.s. The order of steps is crucial!
Upvotes: 2
Reputation: 7307
Check out this answer
Just navigate to "Your Project".xcodeproj > (Right Click & Show Package Contents) > project.xcworkspace > (Right Click & Show Package Contents) > xcSharedData > "Your Project".xccheckout
Right Click on the file and select Open with, and click on "More..". Use your preferred Text Editor to edit the XML inside, or you can always use the trusty TextEdit.
Your old git/svn servers are probably at the bottom, encased in . Just remove em and reload your project in Xcode.
Upvotes: 7