Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locally deleted branch is not deleted on remote repository [duplicate]

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?

like image 620
H.Aziz Kayıhan Avatar asked Jan 19 '16 12:01

H.Aziz Kayıhan


Video Answer


1 Answers

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.

like image 191
alex Avatar answered Oct 18 '22 01:10

alex