Remove refs/remotes entirely

This question already has an answer here:

  • How do I delete a Git branch both locally and remotely? 39 answers

  • You can do this by pushing an empty ref, so:

    git push origin :BranchA :master
    

    will do the trick. If you follow that with a 'git fetch --prune origin', then they won't show up in 'git branch -a' either.


    Simplest answer I found on SO itself and it worked like a charm.

    git push repository :refs/remotes/origin/BranchA

    git push repository :refs/remotes/origin/master

    链接地址: http://www.djcxy.com/p/660.html

    上一篇: 我如何从git仓库剥离分支?

    下一篇: 完全删除裁判/遥控器