Delete a remote branch in Git
12/17/2010
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.
Correct: git push origin production:refs/heads/production
Mistake: git push origin production:ref/heads/production
Result: * [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.
The Fix: git push origin :ref/heads/production
Tags
Amazon
Apache
Audio
Austin Hill
Automator
Career
Clean Urls
CMS
Code Management
Community
Consulting
Culture
Debian
Development
Drupal
Dynamo
EC2
ffmpegx
Framework
Git
github
GiveMeaning
Image
LAMP
Linux
Mac
Macports
Media
Mesh Conference
Mongrel
Mouse Gestures
MySQL
NginX
Package Management
Parallels
Philanthropy
PHP
Preview
Python
Rapid Development
Rebuttal
Relational Scaling
Resize
Rip
RoR
Ruby
Ruby On Rails
S3
Satchmo
SimpleDB
Society
SQS
Tom Williams
Trends
Ubuntu
Web
Web Services
Windows
Wordpress
YouTube
Will Stevens
I am a software developer primarily focused on web applications. I have been working with cloud computing a lot recently. I am active in both the CloudStack and OpenStack communities...

