$ git branch
develop
* feature/bug_76
master
$ git branch -r
origin/HEAD -> origin/master
origin/develop
origin/feature/implement_IBResponder
origin/master
origin/origin
origin/sculptor_strategy
在本地,我很好。我想删除原点上的所有杂物,所以我尝试:
$ git push origin :origin/sculptor_strategy
error: unable to delete 'origin/sculptor_strategy': remote ref does not exist
error: failed to push some refs to 'git@gitlab:pitbull.git'
我究竟做错了什么?
(Wild Guess)是否有一些本地缓存过时的原始内容?
回答
事实证明这是一个红鲱鱼 - 问题是,我的本地缓存已经过时,正如我所怀疑的那样。下面的两个答案都可以正常工作。