threads / discuss / 3918

Default refspec for branches

Subject: Default refspec for branches

## tl;dr

3 messages between Apr 19, 2006 and Apr 19, 2006.

replies: 2people: 2as markdown or json

Josh Boyer· Apr 19, 2006, 12:58 UTC · lore

Is there a way to change the default refspec that git pull uses on a per branch basis? I know that you can create .git/remotes/<foo> and do 'git pull <foo>' to pull from whatever is listed in there, but that isn't quite what I'm looking for.

What I'd like to be able to do is create a branch and have 'git pull' simply pull from the remote tree. I tried listing multiple refspecs in .git/remotes/origin, but git didn't seem to like that.

For example, I clone Linus' tree. Then I create a branch called mtd. When I'm working in that branch, I want 'git pull' to pull from git://git.infradead.org/mtd-2.6.git.

Any ideas?
josh
Junio C Hamano· Apr 19, 2006, 17:45 UTC · re: Josh Boyer · lore

Re: Default refspec for branches

"Josh Boyer" <jwboyer@gmail.com> writes:
> Is there a way to change the default refspec that git pull uses on a
> per branch basis?
No.

But it is a _very_ reasonable thing people would want to be able to. Please look at the last entry in:

        Subject: Recent unresolved issues
        Date: Fri, 14 Apr 2006 02:31:36 -0700
	Message-ID: <7v64lcqz9j.fsf@assigned-by-dhcp.cox.net>
Josh Boyer· Apr 19, 2006, 17:52 UTC · re: Junio C Hamano · lore

Re: Default refspec for branches

On 4/19/06, Junio C Hamano <junkio@cox.net> wrote:
Show 13 quoted lines
> "Josh Boyer" <jwboyer@gmail.com> writes:
>
> > Is there a way to change the default refspec that git pull uses on a
> > per branch basis?
>
> No.
>
> But it is a _very_ reasonable thing people would want to be able
> to.  Please look at the last entry in:
>
>         Subject: Recent unresolved issues
>         Date: Fri, 14 Apr 2006 02:31:36 -0700
>         Message-ID: <7v64lcqz9j.fsf@assigned-by-dhcp.cox.net>
Hm, ok.

I'd offer to work on that, but I have a bit of a learning curve in front of me before I could make something useful. If others beat me to it, I certainly wouldn't mind ;)

josh

← back to recent threads