I was showing someone how great git is using the new version of MSYSgit (version 22.214.171.124.1669.g7eaf8) and found out that calling git push –all will push ALL branches, even if they don’t exist on the remote server. So I ended up pushing a development branch that was very unstable and wanted to remove it. Luckily a quick google search pointed me to this great blog post: .liferc.
Reading this, very to the point, post I was a little confused on what is my repository. So I figured I’d clearify a bit by what you need to do.
Say you have a git branch that you pushed called ‘new_feature_26‘ and you needed to remove it from your remote server called origin, the command would be:
git push origin :heads/new_feature_26
I’m not exactly sure how this works by deleting the remote branch but I know it does!