* Multiple remote.<...>.fetch and .push patterns
@ 2008-06-30 18:58 Adr3nal D0S
2008-06-30 19:29 ` Jon Loeliger
2008-07-01 13:04 ` Jakub Narebski
0 siblings, 2 replies; 7+ messages in thread
From: Adr3nal D0S @ 2008-06-30 18:58 UTC (permalink / raw)
To: git
How can I do something like what is shown in Everyday git using git-config?
$ cat .git/remotes/ko
URL: kernel.org:/pub/scm/git/git.git
Pull: master:refs/tags/ko-master
Pull: next:refs/tags/ko-next
Pull: maint:refs/tags/ko-maint
Push: master
Push: next
Push: +pu
Push: maint
I know I can do:
git config remote.ko.fetch refs/heads/*:refs/tags/ko-*
but that will get all KO heads. And I have no clue about the push version.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Multiple remote.<...>.fetch and .push patterns
2008-06-30 18:58 Multiple remote.<...>.fetch and .push patterns Adr3nal D0S
@ 2008-06-30 19:29 ` Jon Loeliger
2008-06-30 19:52 ` Adr3nal D0S
2008-07-01 13:04 ` Jakub Narebski
1 sibling, 1 reply; 7+ messages in thread
From: Jon Loeliger @ 2008-06-30 19:29 UTC (permalink / raw)
To: Adr3nal D0S; +Cc: git
Adr3nal D0S wrote:
> How can I do something like what is shown in Everyday git using git-config?
>
> $ cat .git/remotes/ko
> URL: kernel.org:/pub/scm/git/git.git
> Pull: master:refs/tags/ko-master
> Pull: next:refs/tags/ko-next
> Pull: maint:refs/tags/ko-maint
> Push: master
> Push: next
> Push: +pu
> Push: maint
>
> I know I can do:
>
> git config remote.ko.fetch refs/heads/*:refs/tags/ko-*
>
> but that will get all KO heads. And I have no clue about the push version.
The file is editable!
You can have both Push: and Pull: lines for a remote there.
Or have I misunderstood your question here?
jdl
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Multiple remote.<...>.fetch and .push patterns
2008-06-30 19:29 ` Jon Loeliger
@ 2008-06-30 19:52 ` Adr3nal D0S
2008-07-01 9:00 ` Michael J Gruber
0 siblings, 1 reply; 7+ messages in thread
From: Adr3nal D0S @ 2008-06-30 19:52 UTC (permalink / raw)
To: Jon Loeliger; +Cc: git
In reference to my question about .git/remotes/ko, Jon Loeliger
<jdl@freescale.com> wrote:
> You can have both Push: and Pull: lines for a remote there.
>
> Or have I misunderstood your question here?
I know that I can create files in .git/remotes that look like Linus'
ko sample. But I was wondering if this could be done with git-config.
I have some developers that are new to SCMs in general and git in
particular. They are a little nervous playing in the git directory.
Also, I was uncertain how settings in .git/remotes files interact with
git-config ...fetch and ...push settings, if at all.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Multiple remote.<...>.fetch and .push patterns
2008-06-30 19:52 ` Adr3nal D0S
@ 2008-07-01 9:00 ` Michael J Gruber
2008-07-01 9:27 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Michael J Gruber @ 2008-07-01 9:00 UTC (permalink / raw)
To: git
Adr3nal D0S venit, vidit, dixit 30.06.2008 21:52:
> In reference to my question about .git/remotes/ko, Jon Loeliger
> <jdl@freescale.com> wrote:
>
>> You can have both Push: and Pull: lines for a remote there.
>>
>> Or have I misunderstood your question here?
>
> I know that I can create files in .git/remotes that look like Linus'
> ko sample. But I was wondering if this could be done with git-config.
> I have some developers that are new to SCMs in general and git in
> particular. They are a little nervous playing in the git directory.
>
> Also, I was uncertain how settings in .git/remotes files interact with
> git-config ...fetch and ...push settings, if at all.
The files under remotes are the old way of configuring remotes (see git
help push). The new are config lines in the remotes section, as written
by "git remote". I don't think "git remote" can write the lines you
want, so I'd suggest:
git config remote.ko.url kernel.org:/pub/scm/git/git.git
git config remote.ko.fetch refs/heads/master:refs/tags/ko-master
git config --add remote.ko.fetch refs/heads/next:refs/tags/ko-next
git config --add remote.ko.fetch refs/heads/maint:refs/tags/ko-maint
You can add similar lines for push with the key remote.ko.push. Note
that you have to use "--add" if you want to have multiple lines for the
same key in config. Also, you can add a "+" in front of the refspec, but
I'm a bit surprised you want that on pushing to ko.
Cheers,
Michael
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Multiple remote.<...>.fetch and .push patterns
2008-07-01 9:00 ` Michael J Gruber
@ 2008-07-01 9:27 ` Junio C Hamano
2008-07-01 9:59 ` Michael J Gruber
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2008-07-01 9:27 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git
Michael J Gruber <michaeljgruber+gmane@fastmail.fm> writes:
> The files under remotes are the old way of configuring remotes (see
> git help push). The new are config lines in the remotes section, as
> written by "git remote". I don't think "git remote" can write the
> lines you want, so I'd suggest:
>
> git config remote.ko.url kernel.org:/pub/scm/git/git.git
> git config remote.ko.fetch refs/heads/master:refs/tags/ko-master
> git config --add remote.ko.fetch refs/heads/next:refs/tags/ko-next
> git config --add remote.ko.fetch refs/heads/maint:refs/tags/ko-maint
I'd actually suggest:
$ edit .git/config
and create this section:
[remote "ko"]
url = master.kernel.org:/pub/scm/git/git.git/
fetch = +refs/heads/*:refs/remotes/ko/*
push = heads/master
push = heads/next
push = +heads/pu
push = heads/maint
(I used to say ko-master but these days I say ko/master).
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Multiple remote.<...>.fetch and .push patterns
2008-07-01 9:27 ` Junio C Hamano
@ 2008-07-01 9:59 ` Michael J Gruber
0 siblings, 0 replies; 7+ messages in thread
From: Michael J Gruber @ 2008-07-01 9:59 UTC (permalink / raw)
To: git
Junio C Hamano venit, vidit, dixit 01.07.2008 11:27:
> Michael J Gruber <michaeljgruber+gmane@fastmail.fm> writes:
>
>> The files under remotes are the old way of configuring remotes (see
>> git help push). The new are config lines in the remotes section, as
>> written by "git remote". I don't think "git remote" can write the
>> lines you want, so I'd suggest:
>>
>> git config remote.ko.url kernel.org:/pub/scm/git/git.git
>> git config remote.ko.fetch refs/heads/master:refs/tags/ko-master
>> git config --add remote.ko.fetch refs/heads/next:refs/tags/ko-next
>> git config --add remote.ko.fetch refs/heads/maint:refs/tags/ko-maint
>
> I'd actually suggest:
>
> $ edit .git/config
Sure, it just seemed OP wanted cut-n-paste commands for his co-workers
(or ko-workers).
> and create this section:
>
> [remote "ko"]
> url = master.kernel.org:/pub/scm/git/git.git/
> fetch = +refs/heads/*:refs/remotes/ko/*
I think that's what OP wanted to avoid.
> push = heads/master
> push = heads/next
> push = +heads/pu
> push = heads/maint
>
> (I used to say ko-master but these days I say ko/master).
OK, that would make it ko/workers above ;)
Seriously: I found the info about those config keys in "git-push.1";
it's also in "git-{pull,fetch}.1". I would expect that info to be in
"git-{remote,config}.1". The latter points to it, the former not really.
Michael
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Multiple remote.<...>.fetch and .push patterns
2008-06-30 18:58 Multiple remote.<...>.fetch and .push patterns Adr3nal D0S
2008-06-30 19:29 ` Jon Loeliger
@ 2008-07-01 13:04 ` Jakub Narebski
1 sibling, 0 replies; 7+ messages in thread
From: Jakub Narebski @ 2008-07-01 13:04 UTC (permalink / raw)
To: Adr3nal D0S; +Cc: git
"Adr3nal D0S" <adr3nald0s@gmail.com> writes:
> How can I do something like what is shown in Everyday git using git-config?
>
> $ cat .git/remotes/ko
> URL: kernel.org:/pub/scm/git/git.git
> Pull: master:refs/tags/ko-master
> Pull: next:refs/tags/ko-next
> Pull: maint:refs/tags/ko-maint
> Push: master
> Push: next
> Push: +pu
> Push: maint
>
> I know I can do:
>
> git config remote.ko.fetch refs/heads/*:refs/tags/ko-*
>
> but that will get all KO heads. And I have no clue about the push version.
remote.<name>.fetch in config is equivalent of "Pull:" line in
$GIT_DIR/remotes/<name>, while remote.<name>.push in config is
eqiovalent of "Push:" line in $GIT_DIR/remotes/<name>.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-01 13:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-30 18:58 Multiple remote.<...>.fetch and .push patterns Adr3nal D0S
2008-06-30 19:29 ` Jon Loeliger
2008-06-30 19:52 ` Adr3nal D0S
2008-07-01 9:00 ` Michael J Gruber
2008-07-01 9:27 ` Junio C Hamano
2008-07-01 9:59 ` Michael J Gruber
2008-07-01 13:04 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).