我创建了一个分支notmaster
来提交和推送一些更改。当我完成该分支时,我将更改合并回master
,将它们推送出去,然后删除本地notmaster
。
$ git branch -a
* master
remotes/origin/master
remotes/origin/notmaster
通常的方法对我来说失败了:
$ git push origin :notmaster
error: dst refspec notmaster matches more than one.
这是因为我有一个与分支同名的标记。这对我来说是一个糟糕的选择,并造成了模棱两可。因此,在这种情况下:
$ git push origin :refs/heads/notmaster
https://stackoverflow.com/questions/4159950
复制相似问题