How to delete GIT branch both in local and remote?

To delete local branch

$ git branch -d your_local_branch

To delete remote branch

$ git push origin :your_remote_branch

or

$ git push origin --delete "branchName"

Deleting remote branch normally done after you or your collaborators are finished with and have merged it into master branch.
However deleting local branch maybe due to testing or wrong branch name or any reason.

By Keenlio, December 16, 2013

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *


nine − = 3

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>