如何删除xcode中的存储库签出历史记录? [英] how to remove repository checkout history in xcode?
问题描述
如图所示,如何清除?我试图通过xcode-> preference-> acount删除帐户,但没有效果.
As shown in the picture, how to clear? I tried to remove at xcode->preference->acount, but it had no effect.
推荐答案
以下内容适用于maOS 10.11.6 Xcode 7.3.1(其他版本可能会将列表存储在其他位置/其他地方,我认为Xcode 11或更早版本可以删除项目直接从GUI):
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):
还可以使用/usr/libexec/PlistBuddy
删除单个存储库.
One can also use /usr/libexec/PlistBuddy
to remove individual repositories.
/usr/libexec/PlistBuddy ~/Library/Preferences/com.apple.dt.Xcode.plist
print :IDESourceControlRecentsFavoritesRepositoriesUserDefaultsKey
计算要删除的顶级项目(从0开始),例如删除第二个项目:
count the top level items you want to delete (0-based), for instance to remove the second one:
delete :IDESourceControlRecentsFavoritesRepositoriesUserDefaultsKey:1
冲洗并重复
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帐户(相对于存储库).首选项
>帐户
标签.
SCM accounts (as opposed to repositories) can be deleted from menu Xcode
> Preferences
> Accounts
tab.
参考文献:
https://fgimian.github.io/blog/2015/06/27/a-simple-plistbuddy-tutorial/
在XCode中清除存储库的历史记录列表
在旁注中,我还注意到关于SO的一些类似问题:
如何清除Xcode中的存储库签出历史记录
如何从xcode删除远程git网址?
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?
这篇关于如何删除xcode中的存储库签出历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!