Re: Multiple remote.<...>.fetch and .push patterns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adr3nal D0S venit, vidit, dixit 30.06.2008 21:52:
In reference to my question about .git/remotes/ko, Jon Loeliger
<jdl@xxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux