Search code examples
xcode4repository

XCode 4.3.2 - How to change repositories


My project is currently stored on a remote SVN server. I need to move that project to a BitBucket git server. I've already added the repository to XCode but how do I move the project over?


Solution

  • Not entirely sure if this is the correct way to do it, but here's how I accomplished it:

    1. You can either copy the project to a new location or update the existing project. I choose to make a copy. I also went ahead and moved the projects to the local path for the new repo.
    2. In Xcode - Open the Project and go to File - Source Control - Hide Remote Status
    3. The go to File - Source Control - Repositories and remove the SVN repo.
    4. Close the project
    5. Using Terminal, show all hidden files.
    6. Using Finder, go to the project directory and remove all of the .svn files (include those bundled in the project file. (There has to be a better way to do this step)
    7. I committed the cleaned project and files to the new repo.
    8. Open the project in Xcode.
    9. Xcode should have already picked up on the new repo and you should be ready to go.

    RE: (There has to be a better way to do this step)

    1. Open Terminal
    2. Navigate to the root of your local working copy
    3. At the terminal command prompt, enter: find . -type d -name '.svn' -print -exec rm -rf {} \;
    4. Hit enter to delete all '.svn' folders in and below the working copy directory