Friday, 27 August 2010

Beginner's guide to : Delete a Git remote branch

Say you have a working branch that is not of any use anymore, and you want to remove it from both your local machine and from the remote server. Here's what you need to do.

On your local :

$ git branch -D branchName
e.g.: git delete -D mybranchname

To permanently delete the branch from the remote repo :

$ git push remoteName :branchName
e.g.: git push origin :mybranchname


No comments:

Post a Comment