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.
I did this by manually editing the .xccheckout
file.
Here are the steps that should work for you:
project.xcworkspace
file, and select "Show Package COntents" 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) .xccheckout
file in your favorite plain-text editor - this is a plist. IDESourceControlProjectWCConfigurations
key, and look for the <dict>
that has the name of the repository that you want to remove. <dict>
there is a key IDESourceControlWCCIdentifierKey
whose value contains an identifier that looks like a UUID - this string identifies the repository. <dict>
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.
find ./ -name .svn -exec rm -rf {} \\;
. 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.
For those who their extra repositories are their old local modules (like local SPMs).
Assuming you already removed the original local package from the source file
You can find the derived data location from the Xcode's preferences:
You will have to manually remove the svn files from the old directory. This will be done using svn commands. You can find the commands below. How do you remove Subversion control for a folder?
Actually, if you start Xcode without loading anything and then check out a fresh copy of your project into a new workspace folder, the irrelevant repository info gets automatically removed in your local copy of the project.
I also recommend that you navigate to Xcode -> Source Control -> %Repository% -> Configure %ProjectName% and select the working branch in the branches panel - just to make sure the trunk|tags|branches folder locations are correctly initialised. (You'll see the repository menu item in the Source Control menu update after you hit done, and the sub menu will expand to give you more options).
It's then a simple matter of committing those changes Xcode has made back to the same repository. The diff tool should indicate the lines of XML from that .xccheckout file that have changed and not much else.
The way I solve this is
That's the way to remove any GIT relation.
this will make a new GIT initialization of your stuff
I have experience with the dialog after going Source Control -> Checkout, what I did is simply remove/edit my account.
Xcode -> Preference -> Accounts -> (do your edit or remove)
I am not 100% sure that also fix yours, but worth a try. By the way, I am using Xcode 6 beta.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.