Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

This question already has an answer here:

I have removed a branch I have after merging it with the master. However, the locally deleted branch is not deleted on remote repo (on github).

On a suggestion in one answer here, I tried git push remote :branch that didn't seem to help. --prune option didn't seem to help either. I think I can go ahead and delete the branch remotely as well, but I don't want to be checking it and tracking with every branch.

Any ideas?

share|improve this question

marked as duplicate by Community Jan 19 at 13:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
This question has already an answer, stackoverflow.com/questions/2003505/… – J.J. Hakala Jan 19 at 12:59
up vote 4 down vote accepted

You want to use this...

git push remote --delete <branch-name>

Although git push remote :branch should have worked. The command says push this branch without a local set, effectively deleting it.

Are you sure the name of your remote is remote? Could it be origin? Use git remote -v to list your remotes.

Failing that, you can delete branches using GitHub's UI.

share|improve this answer
    
Are you replacing branch there with the name of the remote branch? – alex Jan 19 at 13:39
    
Yep, sure. But didn't work. – H.Aziz Kayıhan Jan 19 at 13:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.