{"thread":{"id":"14229","subject":"Multiple remote.<...>.fetch and .push patterns","startedAt":"2008-06-30T18:58:49Z","lastAt":"2008-07-01T13:04:29Z","messageCount":7,"participants":["Adr3nal D0S","Jon Loeliger","Michael J Gruber","Junio C Hamano","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"81768","messageId":"308083c30806301158i1100c84dqe7f50daad417934c@mail.gmail.com","threadId":"14229","inReplyTo":null,"subject":"Multiple remote.<...>.fetch and .push patterns","fromName":"Adr3nal D0S","fromEmail":"adr3nald0s@gmail.com","sentAt":"2008-06-30T18:58:49Z","receivedAt":"2008-06-30T18:58:49Z","isPatch":false,"sender":{"key":"adr3nald0s@gmail.com","avatar":null},"body":"How can I do something like what is shown in Everyday git using git-config?\n\n$ cat .git/remotes/ko\nURL: kernel.org:/pub/scm/git/git.git\nPull: master:refs/tags/ko-master\nPull: next:refs/tags/ko-next\nPull: maint:refs/tags/ko-maint\nPush: master\nPush: next\nPush: +pu\nPush: maint\n\nI know I can do:\n\ngit config remote.ko.fetch refs/heads/*:refs/tags/ko-*\n\nbut that will get all KO heads.  And I have no clue about the push version.\n"},{"id":"81770","messageId":"48693434.4090402@freescale.com","threadId":"14229","inReplyTo":"308083c30806301158i1100c84dqe7f50daad417934c@mail.gmail.com","subject":"Re: Multiple remote.<...>.fetch and .push patterns","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2008-06-30T19:29:56Z","receivedAt":"2008-06-30T19:29:56Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"Adr3nal D0S wrote:\n> How can I do something like what is shown in Everyday git using git-config?\n> \n> $ cat .git/remotes/ko\n> URL: kernel.org:/pub/scm/git/git.git\n> Pull: master:refs/tags/ko-master\n> Pull: next:refs/tags/ko-next\n> Pull: maint:refs/tags/ko-maint\n> Push: master\n> Push: next\n> Push: +pu\n> Push: maint\n> \n> I know I can do:\n> \n> git config remote.ko.fetch refs/heads/*:refs/tags/ko-*\n> \n> but that will get all KO heads.  And I have no clue about the push version.\n\nThe file is editable!\n\nYou can have both Push: and Pull: lines for a remote there.\n\nOr have I misunderstood your question here?\n\njdl\n"},{"id":"81772","messageId":"308083c30806301252l25f072anafbc457f48c6b19e@mail.gmail.com","threadId":"14229","inReplyTo":"48693434.4090402@freescale.com","subject":"Re: Multiple remote.<...>.fetch and .push patterns","fromName":"Adr3nal D0S","fromEmail":"adr3nald0s@gmail.com","sentAt":"2008-06-30T19:52:19Z","receivedAt":"2008-06-30T19:52:19Z","isPatch":false,"sender":{"key":"adr3nald0s@gmail.com","avatar":null},"body":"In reference to my question about .git/remotes/ko, Jon Loeliger\n<jdl@freescale.com> wrote:\n\n> You can have both Push: and Pull: lines for a remote there.\n>\n> Or have I misunderstood your question here?\n\nI know that I can create files in .git/remotes that look like Linus'\nko sample.  But I was wondering if this could be done with git-config.\n I have some developers that are new to SCMs in general and git in\nparticular. They are a little nervous playing in the git directory.\n\nAlso, I was uncertain how settings in .git/remotes files interact with\ngit-config ...fetch and ...push settings, if at all.\n"},{"id":"81848","messageId":"g4croa$3eu$1@ger.gmane.org","threadId":"14229","inReplyTo":"308083c30806301252l25f072anafbc457f48c6b19e@mail.gmail.com","subject":"Re: Multiple remote.<...>.fetch and .push patterns","fromName":"Michael J Gruber","fromEmail":"michaeljgruber+gmane@fastmail.fm","sentAt":"2008-07-01T09:00:54Z","receivedAt":"2008-07-01T09:00:54Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Adr3nal D0S venit, vidit, dixit 30.06.2008 21:52:\n> In reference to my question about .git/remotes/ko, Jon Loeliger\n> <jdl@freescale.com> wrote:\n> \n>> You can have both Push: and Pull: lines for a remote there.\n>>\n>> Or have I misunderstood your question here?\n> \n> I know that I can create files in .git/remotes that look like Linus'\n> ko sample.  But I was wondering if this could be done with git-config.\n>  I have some developers that are new to SCMs in general and git in\n> particular. They are a little nervous playing in the git directory.\n> \n> Also, I was uncertain how settings in .git/remotes files interact with\n> git-config ...fetch and ...push settings, if at all.\n\nThe files under remotes are the old way of configuring remotes (see git \nhelp push). The new are config lines in the remotes section, as written \nby \"git remote\". I don't think \"git remote\" can write the lines you \nwant, so I'd suggest:\n\ngit config remote.ko.url kernel.org:/pub/scm/git/git.git\ngit config remote.ko.fetch refs/heads/master:refs/tags/ko-master\ngit config --add remote.ko.fetch refs/heads/next:refs/tags/ko-next\ngit config --add remote.ko.fetch refs/heads/maint:refs/tags/ko-maint\n\nYou can add similar lines for push with the key remote.ko.push. Note \nthat you have to use \"--add\" if you want to have multiple lines for the \nsame key in config. Also, you can add a \"+\" in front of the refspec, but \nI'm a bit surprised you want that on pushing to ko.\n\nCheers,\nMichael\n"},{"id":"81852","messageId":"7vprpynech.fsf@gitster.siamese.dyndns.org","threadId":"14229","inReplyTo":"g4croa$3eu$1@ger.gmane.org","subject":"Re: Multiple remote.<...>.fetch and .push patterns","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-01T09:27:58Z","receivedAt":"2008-07-01T09:27:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <michaeljgruber+gmane@fastmail.fm> writes:\n\n> The files under remotes are the old way of configuring remotes (see\n> git help push). The new are config lines in the remotes section, as\n> written by \"git remote\". I don't think \"git remote\" can write the\n> lines you want, so I'd suggest:\n>\n> git config remote.ko.url kernel.org:/pub/scm/git/git.git\n> git config remote.ko.fetch refs/heads/master:refs/tags/ko-master\n> git config --add remote.ko.fetch refs/heads/next:refs/tags/ko-next\n> git config --add remote.ko.fetch refs/heads/maint:refs/tags/ko-maint\n\nI'd actually suggest:\n\n\t$ edit .git/config\n\nand create this section:\n\n        [remote \"ko\"]\n                url = master.kernel.org:/pub/scm/git/git.git/\n                fetch = +refs/heads/*:refs/remotes/ko/*\n                push = heads/master\n                push = heads/next\n                push = +heads/pu\n                push = heads/maint\n\n(I used to say ko-master but these days I say ko/master).\n"},{"id":"81857","messageId":"g4cv6f$g29$1@ger.gmane.org","threadId":"14229","inReplyTo":"7vprpynech.fsf@gitster.siamese.dyndns.org","subject":"Re: Multiple remote.<...>.fetch and .push patterns","fromName":"Michael J Gruber","fromEmail":"michaeljgruber+gmane@fastmail.fm","sentAt":"2008-07-01T09:59:43Z","receivedAt":"2008-07-01T09:59:43Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 01.07.2008 11:27:\n> Michael J Gruber <michaeljgruber+gmane@fastmail.fm> writes:\n> \n>> The files under remotes are the old way of configuring remotes (see\n>> git help push). The new are config lines in the remotes section, as\n>> written by \"git remote\". I don't think \"git remote\" can write the\n>> lines you want, so I'd suggest:\n>>\n>> git config remote.ko.url kernel.org:/pub/scm/git/git.git\n>> git config remote.ko.fetch refs/heads/master:refs/tags/ko-master\n>> git config --add remote.ko.fetch refs/heads/next:refs/tags/ko-next\n>> git config --add remote.ko.fetch refs/heads/maint:refs/tags/ko-maint\n> \n> I'd actually suggest:\n> \n> \t$ edit .git/config\n\nSure, it just seemed OP wanted cut-n-paste commands for his co-workers \n(or ko-workers).\n\n> and create this section:\n> \n>         [remote \"ko\"]\n>                 url = master.kernel.org:/pub/scm/git/git.git/\n>                 fetch = +refs/heads/*:refs/remotes/ko/*\n\nI think that's what OP wanted to avoid.\n\n>                 push = heads/master\n>                 push = heads/next\n>                 push = +heads/pu\n>                 push = heads/maint\n> \n> (I used to say ko-master but these days I say ko/master).\n\nOK, that would make it ko/workers above ;)\n\nSeriously: I found the info about those config keys in \"git-push.1\"; \nit's also in \"git-{pull,fetch}.1\". I would expect that info to be in \n\"git-{remote,config}.1\". The latter points to it, the former not really.\n\nMichael\n"},{"id":"81874","messageId":"m3zlp1g3b3.fsf@localhost.localdomain","threadId":"14229","inReplyTo":"308083c30806301158i1100c84dqe7f50daad417934c@mail.gmail.com","subject":"Re: Multiple remote.<...>.fetch and .push patterns","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-07-01T13:04:29Z","receivedAt":"2008-07-01T13:04:29Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Adr3nal D0S\" <adr3nald0s@gmail.com> writes:\n\n> How can I do something like what is shown in Everyday git using git-config?\n> \n> $ cat .git/remotes/ko\n> URL: kernel.org:/pub/scm/git/git.git\n> Pull: master:refs/tags/ko-master\n> Pull: next:refs/tags/ko-next\n> Pull: maint:refs/tags/ko-maint\n> Push: master\n> Push: next\n> Push: +pu\n> Push: maint\n> \n> I know I can do:\n> \n> git config remote.ko.fetch refs/heads/*:refs/tags/ko-*\n> \n> but that will get all KO heads.  And I have no clue about the push version.\n\nremote.<name>.fetch in config is equivalent of \"Pull:\" line in \n$GIT_DIR/remotes/<name>, while remote.<name>.push in config is\neqiovalent of \"Push:\" line in $GIT_DIR/remotes/<name>.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}