The command to remove a remote branch in git is the following
git push origin :/heads/[feature-name]
[feature-name] being the name of the branch
This does the job perfectly, true that.
However by typing it, I can make no association that what I type is actually deleting a branch.
Can you please describe why this actually works? (my question has nothing to do with how it is implemented)
Understanding this, will hopefully help me get a better grasp of how git works.
The format of git push (for our part) is :
So using git push origin :/heads/[feature-name] says to git to push a empty branch to the feature-name branch of origin.
So you clean it.