How do you remove an invalid remote branch reference from Git?

前端 未结 11 2227
攒了一身酷
攒了一身酷 2020-11-28 16:43

In my current repo I have the following output:

$ git branch -a
* master
  remotes/origin/master
  remotes/public/master

I want to delete <

11条回答
  •  独厮守ぢ
    2020-11-28 17:43

    The accepted answer didn't work for me when the ref was packed. This does however:

    $ git remote add public http://anything.com/bogus.git
    $ git remote rm public
    

提交回复
热议问题