Xcode Source Control showing multiple Working Copies

后端 未结 12 1837
孤独总比滥情好
孤独总比滥情好 2020-11-28 09:17

Xcode is showing multiple working copies:

Working Copies
myProject - master
myProject_olderRepo
myProject_originalRepo

The second two are g

相关标签:
12条回答
  • 2020-11-28 10:00

    You might have used other project files. (it happens when you drag files to XCode and you forget to checkmark 'copy items if needed').

    checkout: Xcode git showing multiple repositories

    0 讨论(0)
  • 2020-11-28 10:03

    Solved this by deleting xccheckout file under

    ProjectName.xcodeproj > project.xcworkspace > xcshareddata
    

    This had contained references to the previous repos.

    0 讨论(0)
  • 2020-11-28 10:05

    This solution helped me. Go to terminal and paste below code (this will show hidden files)

    defaults write com.apple.finder AppleShowAllFiles YES.
    

    Now go to your project folder and check if there is any .git files outside your working project folder.

    .git file that is located outside project folder do not belong to your working project but other project. ( This is possible if you have made mistake in creating git for other project)

    Either cut paste this .git file and save it some other location or you can delete it (if not so important). After deleting , reopen your project in xcode.

    0 讨论(0)
  • 2020-11-28 10:07

    I am using Cocoapods and have a .xcworkspace along with my .xcodeproj.

    This is what worked for me:

    1. Remove Cocoapods from the project using pod deintegrate in Terminal.
    2. Run pod clean
    3. Run pod install to create it again.

    Now if you open the Workspace again, the other Working Copies should no longer exist.

    0 讨论(0)
  • 2020-11-28 10:09

    If you have Git repositories showing up, then you must have a *.xcscmblueprint file somewhere in your project. For me, it was in my workspace and not in a project. From terminal window:

    % find . -name '*.xcscmblueprint' ./TaskMe.xcworkspace/xcshareddata/TaskMe.xcscmblueprint

    Edit that file with care to keep just the entry you want. Or perhaps better, just delete the file and add back the repository you want.

    0 讨论(0)
  • 2020-11-28 10:09

    I had forked a project and the new fork was still pointing to the original project files, so I was seeing Git for both the new and the original project. To fix I did the following:

    Project.xcworkspace -> Show Package Contents
    contents.xcworkspacedata -> Change Path
    
    0 讨论(0)
提交回复
热议问题