Quick Reference: Deleting Local and Remote Git Branches

From http://stackoverflow.com/questions/2003505/delete-a-git-branch-both-locally-and-remotely:

Deleting a Local Git Branch:

$ git branch -D <branch-name>
Deleted branch <branch-name> (was <commit-hash>).

Deleting a Remote Git Branch (available as of Git 1.7.0)

$ git push origin --delete <branch-name>
To <git-remote-origin-url>
 - [deleted]         <branch-name>

Comments

Comments powered by Disqus