Deleting Git Branches in Remote Repository

I had recently used a branch to handle all the modifications I was making to a system for a Rails 3.1 upgrade from Rails 2.4.3. After I merged my changes back into the master branch, I deleted the ‘rails3′ branch locally, but it still remained on the remote server.

I found that ‘git push origin :branch_name’ will delete the repository from the remote server if the branch has been removed locally.

$ git push origin :rails3
To git@redconfetti.com:myrepo.git
 - [deleted]         rails3


There are no comments yet. Be the first and leave a response!

Leave a Reply

Wanting to leave an <em>phasis on your comment?

Trackback URL http://www.redconfetti.com/2012/01/deleting-git-branches-in-remote-repository/trackback/