I know this has been covered before, but I have tried the following and can't seem to delete the remote branch.
aly@neon:~/workspace/3DOD_VARIANCE$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/multi_gauss_at_nodes
remotes/origin/old-state-with-mean-deviation-from-centre
remotes/origin/variance-branch
aly@neon:~/workspace/3DOD_VARIANCE$ git branch -r -d origin/old-state-with-mean-deviation-from-centre Deleted remote branch origin/old-state-with-mean-deviation-from-centre (was 0ed90b2).
Fetching origin
From https://bitbucket.org/alykhantejani/3dobjectdetection
* [new branch] old-state-with-mean-deviation-from-centre -> origin/old-state-with-mean-deviation-from-centre
As you can see the branch has been fetched again. Any idea what I'm doing wrong?
Also, as a side note, is there a way for me to check if this branch has already been merged back into master before I delete?
The full push command is the following
git push <remote name> <local branch>:<remote branch>
Just send "no branch at all" to the remote server that way:
git push origin :old-state-with-mean-deviation-from-centre
For the sidenote : git prevents you to delete branch that has not been merged when you use "git branch -d " (and tells you to use -D if you are really sure to delete it anyway).
Also notice the git branch -d -r <branch name>
delete the references in your .git folder (and not the real branch located on the remote server), that's why a new fetch will re create it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With