From: "Peter Harris" <git@peter.is-a-geek.org>
To: "Marc Branchaud" <marcnarc@xiplink.com>
Cc: git@vger.kernel.org
Subject: Re: Working with remotes; cloning remote references
Date: Thu, 16 Oct 2008 16:45:08 -0400 [thread overview]
Message-ID: <eaa105840810161345r69c9f05j66bb850085f561e7@mail.gmail.com> (raw)
In-Reply-To: <48F7A42E.70200@xiplink.com>
On Thu, Oct 16, 2008 at 4:29 PM, Marc Branchaud wrote:
> Peter Harris wrote:
>>
>> "git clone" doesn't have this option, but you can turn it on
>> immediately after with something similar to:
>> git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
>> (which I use for fanning-out my git-svn repos)
>
> Thanks for the pointer (and the quick reply).
>
> That doesn't seem to be what I'm looking for, though -- perhaps I'm missing
> something? The above puts the remotes in the .git/refs/remotes directory,
> but the .git/config file doesn't have them.
Ah. I believe I misunderstood what you wanted. Perhaps you want "git
remote add", then? Unfortunately, you have to know what your remotes
are outside of git for this. Perhaps a script in the root of your
repository you can run to set this up after the initial clone?
I seem to recall some discussion of allowing a .gitconfig to be in
repositories (similar to .gitignore), but the idea was shot down for
security reasons.
> (As an aside, the above "git config --add" incantation causes problems if
> run inside a clone of a clone:
>
> You did say "something similar" in your reply -- am I not seeing something
> obvious?
I said "something similar" because you probably actually want
git config --add remote.$remote.fetch +refs/remotes/*:refs/remotes/$remote/*
(or other names of your own choosing) so that multiple remote remotes
don't stomp on each other.
Unless you want to be able to address the remotes by name, in which
case you want "git remote add" instead (see above).
Peter Harris
next prev parent reply other threads:[~2008-10-16 20:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 18:17 Working with remotes; cloning remote references Marc Branchaud
2008-10-16 19:20 ` Peter Harris
2008-10-16 20:29 ` Marc Branchaud
2008-10-16 20:45 ` Peter Harris [this message]
2008-10-16 22:09 ` Marc Branchaud
2008-10-17 7:33 ` Michael J Gruber
2008-10-17 14:44 ` Marc Branchaud
2008-10-17 15:08 ` Michael J Gruber
2008-10-17 19:50 ` Marc Branchaud
2008-10-20 13:22 ` Michael J Gruber
2008-10-20 16:50 ` Marc Branchaud
2008-10-21 9:49 ` Michael J Gruber
2008-10-21 15:17 ` Marc Branchaud
2008-10-22 14:59 ` Michael J Gruber
2008-10-22 16:13 ` Terminology question: "tracking" branches Björn Steinbrink
2008-10-23 8:07 ` Michael J Gruber
2008-10-27 15:43 ` Marc Branchaud
2008-10-27 16:17 ` Björn Steinbrink
2008-10-27 18:44 ` Johannes Schindelin
2008-10-27 16:28 ` Björn Steinbrink
2008-10-28 8:01 ` Björn Steinbrink
2008-10-27 19:54 ` Working with remotes; cloning remote references Marc Branchaud
2008-10-28 8:12 ` Michael J Gruber
2008-10-28 16:27 ` Marc Branchaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eaa105840810161345r69c9f05j66bb850085f561e7@mail.gmail.com \
--to=git@peter.is-a-geek.org \
--cc=git@vger.kernel.org \
--cc=marcnarc@xiplink.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).