This question already has an answer here:
When I do git ls-remote
to my remote repository it shows:
HEAD
refs/heads/BranchA
refs/heads/master
refs/remotes/origin/BranchA
refs/remotes/origin/master
How can I delete the last two entries?
This question already has an answer here: When I do
How can I delete the last two entries? |
|||||||||||||
marked as duplicate by larsks, Mario Sannum, Wouter J, poke, VonC Mar 1 '14 at 18:13This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||||||||||||
|
You can do this by pushing an empty ref, so:
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 |
|||
|