From: Marc Branchaud Date: Thu, 16 Oct 2008 20:29:34 GMT Subject: Re: Working with remotes; cloning remote references Message-ID: <48F7A42E.70200@xiplink.com> In-Reply-To: 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. More specifically, if I clone the main repository and run the above and then fetch, then AFAICT I'm still not linked to the external mirrors in the clone. In particular, I can't refer to an external project in the subtree pull: $ git pull -s subtree external2 master fatal: 'external2': unable to chdir or not a git archive (Where 'external2' is the name of the remote in the main repo.) Also, the only remote in the config file is still just the origin. (As an aside, the above "git config --add" incantation causes problems if run inside a clone of a clone: $ git clone main clone-of-main $ git clone clone-of-main clone-of-clone-of-main $ cd clone-of-clone-of-main $ git config --add remote.origin.fetch \ +refs/remotes/*:refs/remotes/* $ git pull fatal: refs/remotes/origin/master tracks both refs/remotes/origin/master and refs/heads/master ) You did say "something similar" in your reply -- am I not seeing something obvious? Marc