Delete a remote branch in Git
I run into this all the time. I am typing too fast when I push code to my remote repository and I make a typo that creates a new branch in my remote repository.
git push origin production:refs/heads/production
git push origin production:ref/heads/production
* [new branch] production -> ref/heads/production
Obviously I do not want this new branch on my remote server, so I want to remove it. You can remove this newly created branch with.
git push origin :ref/heads/production