xcode remove repository from project
Solution 1
I did this by manually editing the .xccheckout
file.
Here are the steps that should work for you:
- quit Xcode, and make a backup of your project file.
- in the Finder, right-click on your project file and select "Show Package Contents"
- right-click on the
project.xcworkspace
file, and select "Show Package COntents" - in the folder named
xcshareddata
, there is a file with the extension.xccheckout
(it should have the same name as your main project file, but with the.xccheckout
extension) - make a backup of this file
- open the
.xccheckout
file in your favorite plain-text editor - this is a plist. - find the
IDESourceControlProjectWCConfigurations
key, and look for the<dict>
that has the name of the repository that you want to remove. - in the same
<dict>
there is a keyIDESourceControlWCCIdentifierKey
whose value contains an identifier that looks like a UUID - this string identifies the repository. - search the entire file for key/string pairs that have the ID as the key. delete all these pairs.
- delete the
<dict>
- save the file
- re-open the project in Xcode, and make sure everything is good.
If it is still showing up, make sure that none of the files in your project are located in the directory of the old repository (via an absolute file reference). You can investigate this by opening up the main file project.pbxproj
, which is inside your project file.
You can also test this out by temporarily renaming the root folder (in the Finder) of the old repository, and if the repository no longer shows up in the Source Control menu, then you have a file in your project that is located in that old repository.
Solution 2
- Close XCode.
- Open Terminal.
- Navigate to the root directory of the project.
- Type
find ./ -name .svn -exec rm -rf {} \;
. - Open your project.
Your project should be disconnected from all repositories. Now you may connect your project to the desired repository through Source Control -> Configure Project
.
NOTE: The command searches for all filenames with extension .svn
and removes (recursively and forcefully) all of them.
Related videos on Youtube
bbrame
Updated on June 04, 2022Comments
-
bbrame over 1 year
My xcode project has two repositories listed under the Source Control menu. One of them is a repository from an old project and should not be associated with the current project. However, I can not figure out how to remove it from the project.
NOTE: I have already removed this repository from Organizer.
Any help would be greatly appreciated.
-
bbrame about 10 yearsThanks, @Nareshkumar, but the repository is for a different project. I don't want to remove the repository. I just don't want it to be associated with this xcode project anymore.