{"thread":{"id":"19626","subject":"remotely deleting a branch","startedAt":"2009-06-01T10:16:46Z","lastAt":"2009-06-01T11:02:23Z","messageCount":3,"participants":["jean-luc malet","John Tapsell","Gustaf Hendeby"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"115188","messageId":"1de9d39c0906010316v657f2624i3f16b8b5bea73122@mail.gmail.com","threadId":"19626","inReplyTo":null,"subject":"remotely deleting a branch","fromName":"jean-luc malet","fromEmail":"jeanluc.malet@gmail.com","sentAt":"2009-06-01T10:16:46Z","receivedAt":"2009-06-01T10:16:46Z","isPatch":false,"sender":{"key":"jeanluc.malet@gmail.com","avatar":null},"body":"hi!\nI created a remote branch by doing\n$ git push origin mynewbranch\nI done some work on mynewbranch, commited, pushed changes to origin,\nmerged it to master and pushed to origin and deleted the mynewbranch\nlocaly because I don't need it anymore\nnow I want to \"undo\" the git push origin mynewbranch ie remotely\ndelete the branch from the repository\nI tried git push --mirror but it deleted all remote branches that I\ndidn't worked on... I don't want to have it be a mirror... but\nsomething like\n$ git branch -r -d origin/mynewbranch\n$ git push\n   ---> deleting origin/mynewbranch\n\nhow shall I do that?\nthanks\nJLM\n\n-- \nKISS! (Keep It Simple, Stupid!)\n(garde le simple, imbécile!)\n\"mais qu'est-ce que tu m'as pondu comme usine à gaz? fait des choses\nsimples et qui marchent, espèce d'imbécile!\"\n-----------------------------\n\"Si vous pensez que vous êtes trop petit pour changer quoique ce soit,\nessayez donc de dormir avec un moustique dans votre chambre.\" Betty\nReese\nhttp://www.grainesdechangement.com/citations.htm\n"},{"id":"115194","messageId":"4A23B481.6000302@isy.liu.se","threadId":"19626","inReplyTo":"4A23AE5A.4040804@isy.liu.se","subject":"Re: remotely deleting a branch","fromName":"Gustaf Hendeby","fromEmail":"hendeby@isy.liu.se","sentAt":"2009-06-01T10:59:13Z","receivedAt":"2009-06-01T10:59:13Z","isPatch":false,"sender":{"key":"hendeby@isy.liu.se","avatar":"https://avatars.githubusercontent.com/u/730316?v=4"},"body":"This should of course have been cc to the list too...\n\nGustaf Hendeby wrote:\n> jean-luc malet wrote:\n>> hi!\n>> I created a remote branch by doing\n>> $ git push origin mynewbranch\n>> I done some work on mynewbranch, commited, pushed changes to origin,\n>> merged it to master and pushed to origin and deleted the mynewbranch\n>> localy because I don't need it anymore\n>> now I want to \"undo\" the git push origin mynewbranch ie remotely\n>> delete the branch from the repository\n>> I tried git push --mirror but it deleted all remote branches that I\n>> didn't worked on... I don't want to have it be a mirror... but\n>> something like\n>> $ git branch -r -d origin/mynewbranch\n>> $ git push\n>>    ---> deleting origin/mynewbranch\n>>\n>> how shall I do that?\n>> thanks\n>> JLM\n>>\n> \n> Hi Jean-Luc!\n> \n> Have a look at the help for push, you will find\n> \n>   git push origin :mynewbranch\n> \n> to be what you are looking for.  It is listed quite far down as an example.\n> \n> /Gustaf\n> \n"},{"id":"115193","messageId":"43d8ce650906010402t792df314v1ed632e79f42bca7@mail.gmail.com","threadId":"19626","inReplyTo":"1de9d39c0906010316v657f2624i3f16b8b5bea73122@mail.gmail.com","subject":"Re: remotely deleting a branch","fromName":"John Tapsell","fromEmail":"johnflux@gmail.com","sentAt":"2009-06-01T11:02:23Z","receivedAt":"2009-06-01T11:02:23Z","isPatch":false,"sender":{"key":"johnflux@gmail.com","avatar":"https://gravatar.com/avatar/25f70d4c0f96396b84a2e34bcd9bdc233462c7b4be29b5fdca8266fc53f30b0c?d=mp&s=160"},"body":"2009/6/1 jean-luc malet <jeanluc.malet@gmail.com>:\n> hi!\n> I created a remote branch by doing\n> $ git push origin mynewbranch\n> I done some work on mynewbranch, commited, pushed changes to origin,\n> merged it to master and pushed to origin and deleted the mynewbranch\n> localy because I don't need it anymore\n> now I want to \"undo\" the git push origin mynewbranch ie remotely\n> delete the branch from the repository\n> I tried git push --mirror but it deleted all remote branches that I\n> didn't worked on... I don't want to have it be a mirror... but\n> something like\n> $ git branch -r -d origin/mynewbranch\n> $ git push\n>   ---> deleting origin/mynewbranch\n>\n> how shall I do that?\n\nYeah, it's pretty confusing on how to delete a remote branch.  The\nmagic command is:\n\ngit push origin -f :mynewbranch\n\nHopefully someone will figure out a way to make git a bit more\nintuitive in this respect.  Maybe a remote option for git branch -d or\nsomething.\nJohn\n"}]}