remotely deleting a branch

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

remotely deleting a branch

From: jean-luc malet <hidden>
Date: 2016-06-15 22:46:53

hi!
I created a remote branch by doing
$ git push origin mynewbranch
I done some work on mynewbranch, commited, pushed changes to origin,
merged it to master and pushed to origin and deleted the mynewbranch
localy because I don't need it anymore
now I want to "undo" the git push origin mynewbranch ie remotely
delete the branch from the repository
I tried git push --mirror but it deleted all remote branches that I
didn't worked on... I don't want to have it be a mirror... but
something like
$ git branch -r -d origin/mynewbranch
$ git push
   ---> deleting origin/mynewbranch

how shall I do that?
thanks
JLM

-- 
KISS! (Keep It Simple, Stupid!)
(garde le simple, imbécile!)
"mais qu'est-ce que tu m'as pondu comme usine à gaz? fait des choses
simples et qui marchent, espèce d'imbécile!"
-----------------------------
"Si vous pensez que vous êtes trop petit pour changer quoique ce soit,
essayez donc de dormir avec un moustique dans votre chambre." Betty
Reese
http://www.grainesdechangement.com/citations.htm

Re: remotely deleting a branch

From: John Tapsell <hidden>
Date: 2016-06-15 22:46:53

2009/6/1 jean-luc malet [off-list ref]:
hi!
I created a remote branch by doing
$ git push origin mynewbranch
I done some work on mynewbranch, commited, pushed changes to origin,
merged it to master and pushed to origin and deleted the mynewbranch
localy because I don't need it anymore
now I want to "undo" the git push origin mynewbranch ie remotely
delete the branch from the repository
I tried git push --mirror but it deleted all remote branches that I
didn't worked on... I don't want to have it be a mirror... but
something like
$ git branch -r -d origin/mynewbranch
$ git push
  ---> deleting origin/mynewbranch

how shall I do that?
Yeah, it's pretty confusing on how to delete a remote branch.  The
magic command is:

git push origin -f :mynewbranch

Hopefully someone will figure out a way to make git a bit more
intuitive in this respect.  Maybe a remote option for git branch -d or
something.
John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help