XCode - Remove Local Git Repository

If you create a XCode project with "create local Git repository" check, your project will be locally versioned.



But, it does not seem to have an easy way to remove it afterward. Why you want to do it? It may because

1. You want your project to recognize remote SVN/Git repository setting.
2. Double click on xcodeproject so that XCode organizer automatically recognize your current SVN/Git setting

Below may help you in removing local Git repository completely in your project.

1. Go to the root of your project folder. Usually, it is the folder that contains the .xcodeproject file
2. Remove the .git folder. It is hidden. You can use

rm -rf .git

3. Open your project. It should open XCode IDE.
4. Look at the top right corner of the XCode IDE. Open Organizer



5. At Organizer, navigate to Repository



6. Remove all existing/related repository for your project by clicking on the project and click on the - sign on bottom left of Organizer



7. Now, navigate to Projects
8. Remove all exiting/related project EXCEPT the project that is stated open
9. Then, Click on the delete for derived data and snapshot



10. Quit XCode completely.
11. Double click on your .xcodeproject to launch XCode. Now, XCode should recognize your remote SVN/Git setting at Organizer -> Repository

Comments

  1. Thank you so much! I had been looking for a way to map my project for some time now, to the point that I had resigned about doing it until today that I found your blog. Perfect!

    ReplyDelete

Post a Comment

Popular Posts