{"thread":{"id":"10273","subject":"How to manage heads on a remote repository?","startedAt":"2007-10-14T10:46:25Z","lastAt":"2007-10-14T11:32:07Z","messageCount":6,"participants":["Theodore Ts'o","Michael Witten","David Symonds","Theodore Tso"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55695","messageId":"E1Ih0zJ-0004FZ-0A@tinytim.thunk.org","threadId":"10273","inReplyTo":null,"subject":"How to manage heads on a remote repository?","fromName":"Theodore Ts'o","fromEmail":"tytso@mit.edu","sentAt":"2007-10-14T10:46:25Z","receivedAt":"2007-10-14T10:46:25Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"\nI'm currently exploring the idea of not only making the equivalent of\n\"pu\" and \"next\" available on a public repository for one of my projects,\nbut also the topics/* branches.   When thinking about how I might do\nthis, one snag I ran into is that the topics/foo and topics/bar branches\nare ephemeral, and so when I replicate them to a remote repository,\neither on kernel.org or repo.or.cz, I would need a way of removing a\nhead for a topic branch that had already been merged.\n\nCreating new topics/foo branch or updating is easy; just do a git push,\nand they will get created on the remote side.  I don't see an easy way\nof deleting a ref on a remote branch, so any automation at the moment\nlooks like it would require me writing my own script and using something\nlike this:\n\n      ssh remote-host git --git-dir=xxx branch -D topics/foo\n\n... which of course wouldn't work repo.or.cz since it requires shell\naccess.\n\nAm I missing anything?\n\n\t\t\t\t\t\t\t- Ted\n"},{"id":"55696","messageId":"FE53CAAB-6BAC-4EB6-A36F-C9DA69EDB04A@mit.edu","threadId":"10273","inReplyTo":"E1Ih0zJ-0004FZ-0A@tinytim.thunk.org","subject":"Re: How to manage heads on a remote repository?","fromName":"Michael Witten","fromEmail":"mfwitten@mit.edu","sentAt":"2007-10-14T10:55:31Z","receivedAt":"2007-10-14T10:55:31Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"\nOn 14 Oct 2007, at 6:46:25 AM, Theodore Ts'o wrote:\n\n> so any automation at the moment\n> looks like it would require me writing my own script and using  \n> something\n> like this:\n>\n>       ssh remote-host git --git-dir=xxx branch -D topics/foo\n>\n> ... which of course wouldn't work repo.or.cz since it requires shell\n> access.\n>\n> Am I missing anything?\n\nWith my little exposure to git, I'd say it's not currently possible\nwith the git ui, but please wait for someone more authoritative to\nsay so.\n\nIn any case, I've run across similar problems, and I think this is\na good time to point out the feature that would be nice:\n\t\n\tAll (most) git ui operations should be (relatively)\n\ttransparent across networks;\n\nI would like to clone to a remote server, for instance.\n\nMichael Witten\n"},{"id":"55697","messageId":"ee77f5c20710140403j7a88ffa4q579a8c4118d8fd71@mail.gmail.com","threadId":"10273","inReplyTo":"E1Ih0zJ-0004FZ-0A@tinytim.thunk.org","subject":"Re: How to manage heads on a remote repository?","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2007-10-14T11:03:48Z","receivedAt":"2007-10-14T11:03:48Z","isPatch":false,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"On 14/10/2007, Theodore Ts'o <tytso@mit.edu> wrote:\n>\n> I'm currently exploring the idea of not only making the equivalent of\n> \"pu\" and \"next\" available on a public repository for one of my projects,\n> but also the topics/* branches.   When thinking about how I might do\n> this, one snag I ran into is that the topics/foo and topics/bar branches\n> are ephemeral, and so when I replicate them to a remote repository,\n> either on kernel.org or repo.or.cz, I would need a way of removing a\n> head for a topic branch that had already been merged.\n\ngit push <remote> :<branch_name>\n\nIf the left side of the colon in a push refspec is empty, it deletes\nthe remote ref given by the right hand side.\n\n\nDave.\n"},{"id":"55698","messageId":"20071014110714.GA17368@thunk.org","threadId":"10273","inReplyTo":"ee77f5c20710140403j7a88ffa4q579a8c4118d8fd71@mail.gmail.com","subject":"Re: How to manage heads on a remote repository?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-10-14T11:07:14Z","receivedAt":"2007-10-14T11:07:14Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:\n> On 14/10/2007, Theodore Ts'o <tytso@mit.edu> wrote:\n> >\n> > I'm currently exploring the idea of not only making the equivalent of\n> > \"pu\" and \"next\" available on a public repository for one of my projects,\n> > but also the topics/* branches.   When thinking about how I might do\n> > this, one snag I ran into is that the topics/foo and topics/bar branches\n> > are ephemeral, and so when I replicate them to a remote repository,\n> > either on kernel.org or repo.or.cz, I would need a way of removing a\n> > head for a topic branch that had already been merged.\n> \n> git push <remote> :<branch_name>\n> \n> If the left side of the colon in a push refspec is empty, it deletes\n> the remote ref given by the right hand side.\n\nCool, thanks!  It's not in the git-push man page.  I'll play with it\nsome and then submit a patch update the man page.\n\n     \t      \t       \t     \t    \t    - Ted\n"},{"id":"55699","messageId":"ee77f5c20710140412s1eb68991ke552995dbbd226b@mail.gmail.com","threadId":"10273","inReplyTo":"20071014110714.GA17368@thunk.org","subject":"Re: How to manage heads on a remote repository?","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2007-10-14T11:12:43Z","receivedAt":"2007-10-14T11:12:43Z","isPatch":false,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"On 14/10/2007, Theodore Tso <tytso@mit.edu> wrote:\n> On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:\n> > git push <remote> :<branch_name>\n> >\n> > If the left side of the colon in a push refspec is empty, it deletes\n> > the remote ref given by the right hand side.\n>\n> Cool, thanks!  It's not in the git-push man page.  I'll play with it\n> some and then submit a patch update the man page.\n\nYes, it is, including in the examples section. Under the <refspec>\noptions description it says:\n\n  Pushing an empty <src> allows you to delete the <dst> ref from\n  the remote repository.\n\nIn the examples section, it says:\n\n  git push origin :experimental\n         Find a ref that matches experimental in the origin repository\n         (e.g. refs/heads/experimental), and delete it.\n\n\nDave.\n"},{"id":"55700","messageId":"20071014113206.GB17368@thunk.org","threadId":"10273","inReplyTo":"ee77f5c20710140412s1eb68991ke552995dbbd226b@mail.gmail.com","subject":"Re: How to manage heads on a remote repository?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-10-14T11:32:07Z","receivedAt":"2007-10-14T11:32:07Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Sun, Oct 14, 2007 at 09:12:43PM +1000, David Symonds wrote:\n> On 14/10/2007, Theodore Tso <tytso@mit.edu> wrote:\n> > On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:\n> > > git push <remote> :<branch_name>\n> > >\n> > > If the left side of the colon in a push refspec is empty, it deletes\n> > > the remote ref given by the right hand side.\n> >\n> > Cool, thanks!  It's not in the git-push man page.  I'll play with it\n> > some and then submit a patch update the man page.\n> \n> Yes, it is, including in the examples section. \n\nWow, I completely missed that!  It would be nice if:\n\n       <refspec>\n          The canonical format of a <refspec> parameter is +?<src>:<dst>; that\n          is, an optional plus +, followed by the source ref, followed by a\n          colon :, followed by the destination ref.\n\n.... mentioned that the source ref could be optional (just like it\nexplicitly says the '+' is optional)...\n\n          The <src> side can be an arbitrary \"SHA1 expression\" that can be\n          used as an argument to git-cat-file -t. E.g. master~4 (push four\n          parents before the current master head).\n\n.... and I think the throwaway sentence at the end of the refspec\nwould be better at the end of the second paragraph above.  I'll send a\npatch.\n\nThanks for pointing that out!\n\n       \t      \t     \t \t\t  - Ted\n"}]}