"在我目前的回购中,我有以下输出:
$ git branch -a
* maste
remotes/origin/maste
remotes/public/maste
我想remotes/public/master从分支列表中删除:
$ git branch -d remotes/public/maste
error: branch 'remotes/public/master' not found.
此外,输出git remote是奇怪的,因为它没有列出public:
$ git remote show
origin
如何从分支列表中删除“远程/公共/主”?
更新,尝试git push命令:
$ git push public :maste
fatal: 'public' does not appear to be a git repository
fatal: The remote end hung up unexpectedly"
git push public :maste
这将删除命名master为Kent Fredric 的远程分支指出。
列出远程追踪分行:
git branch -
要删除远程跟踪分支:
git branch -rd public/master
所有你需要做的是
git fetch -p
它将删除所有您远程删除的本地分行。
如果你在git 1.8.5以上,你可以自动设置
git config fetch.prune true
要么
git config --global fetch.prune true