“Share working copy?” in Xcode when adding a project under git version control

I have a project using git for version control. I cloned a library to use from GitHub (also presumably using git). I added the downloaded project’s .xcodeproj file to my own project and got this dialog:

Share working copy?
A working copy that has not been shared has been added to this workspace. Choose Yes to add this working copy to the Workspace Source Control Data.

What happens if I choose “Yes” or “No”? Which should I choose in this situation?

enter image description here

  • What is the best way to integrate TFS version control
  • How do i get files from a GIT repository in objective c?
  • Xcode: Could not read from remote repository
  • Xcode, Git, Jenkins, PhoneGap 1.5.0 Build Error
  • How do I revert back to earlier commit using source tree
  • xcode not showing some files
  • Why Xcode automatically changes `xcschememanagement.plist` file while checking out a branch?
  • How to create an Xcode project for an existing GitHub repository
  • 2 Solutions collect form web for ““Share working copy?” in Xcode when adding a project under git version control”

    I tried adding a second project to my workspace both ways:

    1. Dragging the .xcodeproj file into the Project Navigator

    2. File > Add Files to “WORKSPACE_NAME”…

    The alert showed up both ways.

    I also tried multiple times, clicking both Yes & No. Either way, none of my files being tracked by Git were changed, which I confirmed with git diff.

    I Git ignore xcuserdata though. So, maybe it affects files stored in WORKSPACE_NAME.xcworkspace/xcuserdata/. I didn’t check though because, frankly, I don’t care about that data.

    So, after adding the project to the workspace, I closed the workspace, and ran git clean -dXf (Careful! That command removes all ignored files, which may delete files you want to keep around.) so that if it did change any files that Git isn’t tracking, well, now they’re gone!

    When I open back up the workspace, Xcode regenerates those xcuserdata files anyway.

    Choose Yes.
    Then go to Xcode > Preferences and choose the Accounts tab. Now click the + button in the lower lefthand corner and choose Add Repository....
    And paste in the HTTPS Clone URL (i.e. https://github.com/samvermette/SVProgressHUD.git) and click Next.

    If it’s a public repository, you shouldn’t need any credentials. Now if you close the Xcode Preferences and select one of the new files you’ve brought into the project and then view the File Inspector, you should see that Xcode shows you the current source control status for the files that relate to that repository.

    Git Baby is a git and github fan, let's start git clone.