0

image for question

As shown in the picture, how to clear? I tried to remove at xcode->preference->acount, but it had no effect.

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
huntaiji
  • 1
  • 3

2 Answers2

0

In your terminal hit below command to clear the XCode preferences

defaults delete com.apple.dt.Xcode
David Buck
  • 3,594
  • 33
  • 29
  • 34
Anand Kore
  • 1,240
  • 1
  • 15
  • 33
0

The following works on maOS 10.11.6 Xcode 7.3.1 (other versions may store the list differently/elsewhere, I think Xcode 11 and perhaps earlier can remove items directly from the GUI):

One can also use /usr/libexec/PlistBuddy to remove individual repositories.

/usr/libexec/PlistBuddy ~/Library/Preferences/com.apple.dt.Xcode.plist

print :IDESourceControlRecentsFavoritesRepositoriesUserDefaultsKey

count the top level items you want to delete (0-based), for instance to remove the second one:

delete :IDESourceControlRecentsFavoritesRepositoriesUserDefaultsKey:1

rinse and repeat

save
quit

Notice that when removing repositories with submodules one will most probably want to remove those too as they refer to a working copy inside the deleted one.

SCM accounts (as opposed to repositories) can be deleted from menu Xcode > Preferences > Accounts tab.

References:
https://fgimian.github.io/blog/2015/06/27/a-simple-plistbuddy-tutorial/
Clearing history list of repositories in XCode

On a side note, I also noticed a few similar questions on SO:
How to clear repository checkout history in Xcode
How to remove remote git urls from xcode?

David Buck
  • 3,594
  • 33
  • 29
  • 34
Eucyon
  • 41
  • 3