xcode 8 remove unused working copy under source control

Issue

I’m working with Xcode 8 and git as source control. I have made my one git for the project. How can we remove the unused working copy as bellow pic

enter image description here

I want to delete the “SAM” working copy to avoid confusion. How can we delete that.

Updated

I have edit the xcscmblueprint file. but seem the unused still appear.

Here is my content of xcmblueprint file (after modified)

{
  "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "1D213AF52C5E818A80BAB36B9C687DEB14CD1671",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

  },
  "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
    "1D213AF52C5E818A80BAB36B9C687DEB14CD1671" : 9223372036854775807
  },
  "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "1A669691-0E1E-4D71-AD4F-5F0808376441",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
    "1D213AF52C5E818A80BAB36B9C687DEB14CD1671" : "eSAM\/"
  },
  "DVTSourceControlWorkspaceBlueprintNameKey" : "SAMKiosk",
  "DVTSourceControlWorkspaceBlueprintVersion" : 204,
  "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "SAMKiosk.xcodeproj",
  "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
    {
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/victory1908\/SingPostESam.git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1D213AF52C5E818A80BAB36B9C687DEB14CD1671"
    }
  ]
}

Hi updated my original xcmblueprint (before modified)

{
  "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "1D213AF52C5E818A80BAB36B9C687DEB14CD1671",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

  },
  "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
    "CCEA429BB0CEB6873EA4927D131EA2335FDBC324" : 0,
    "1D213AF52C5E818A80BAB36B9C687DEB14CD1671" : 9223372036854775807
  },
  "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "1A669691-0E1E-4D71-AD4F-5F0808376441",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
    "CCEA429BB0CEB6873EA4927D131EA2335FDBC324" : "SAM",
    "1D213AF52C5E818A80BAB36B9C687DEB14CD1671" : "eSAM\/"
  },
  "DVTSourceControlWorkspaceBlueprintNameKey" : "SAMKiosk",
  "DVTSourceControlWorkspaceBlueprintVersion" : 204,
  "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "SAMKiosk.xcodeproj",
  "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
    {
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/victory1908\/SingPostESam.git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1D213AF52C5E818A80BAB36B9C687DEB14CD1671"
    },
    {
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/ZNO-INTL\/SAM.git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "CCEA429BB0CEB6873EA4927D131EA2335FDBC324"
    }
  ]
}

Solution

Please refer to Xcode delete working copies of source control.

You must select shared for scheme first otherwise you will not find .xcshareddata file.

Please try to modify file as below, and then restart:

{
  "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "1D213AF52C5E818A80BAB36B9C687DEB14CD1671",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

  },
  "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
    "1D213AF52C5E818A80BAB36B9C687DEB14CD1671" : 9223372036854775807
  },
  "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "1A669691-0E1E-4D71-AD4F-5F0808376441",
  "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
    "1D213AF52C5E818A80BAB36B9C687DEB14CD1671" : "eSAM\/"
  },
  "DVTSourceControlWorkspaceBlueprintNameKey" : "SAMKiosk",
  "DVTSourceControlWorkspaceBlueprintVersion" : 204,
  "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "SAMKiosk.xcodeproj",
  "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
    {
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/victory1908\/SingPostESam.git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
      "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1D213AF52C5E818A80BAB36B9C687DEB14CD1671"
    }
  ]
}

Answered By – Marina Liu

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published