Re: Per-remote tracking branch
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Sep 24, 2009, 11:25 UTC
- Message-ID
- <20090924112550.GA6540@atjola.homenet>
- In-Reply-To
- <vpq4or48bux.fsf@bauges.imag.fr>
On 2009.09.15 17:29:58 +0200, Matthieu Moy wrote:
Show 23 quoted lines
> Hi, > > Is there a way, with Git, to specify a tracking branch on a per-remote > basis? > > At the moment, I can configure a tracking branch to let me just type > > $ git pull > > when I want to say > > $ git pull origin master > > Now, assume I have another remote "foo", I'd like to be able to just > say > > $ git pull foo > > and put something in my .git/config so that Git knows I mean > > $ git pull foo master > > Is there a simple way to do that?
Setup "foo" so that it fetches "master" only, i.e. have remote.foo.fetch = refs/heads/master:refs/remotes/foo/master
You get that setup with: git remote add -t master foo git://...
Then there's only one possible choice for "git pull", and it will take that.
Björn