Remove branch from remote git repo

Adam K Dean - Aug 4 '14 - - Dev Community

To remove a branch from a remote git repository, you have to push an empty branch.

$ git push origin :branch-name
- [deleted]        branch-name
Enter fullscreen mode Exit fullscreen mode

If you want to also remove it from the local repo, delete the branch:

$ git checkout master 
Switch to branch 'master'

$ git branch -D branch-name
Deleted branch branch-name (was abcd123)
Enter fullscreen mode Exit fullscreen mode

We change branch as you can't delete the branch you're on.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player