从手册页:
Deletes all stale tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>".
因此,我使用删除了一堆分支
git push origin :staleStuff
然后运行
git remote prune origin
但是,只修剪了一个本地分支。这些分支中的一些是由我创建的,有些是由同事创建的。这是否表明我一开始没有正确跟踪那些分支?
[使用git push origin :staleStuff
时,它会自动删除origin/staleStuff
,因此,当您运行git remote prune origin
时,您已经修剪了被其他人删除的某个分支。您的同事现在更有可能需要运行git prune
来摆脱已删除的分支。