# Default refspec for branches

3 messages from 2006-04-19 to 2006-04-19. Participants: Josh Boyer, Junio C Hamano.
Thread: https://gitlist.dev/t/3918

## Josh Boyer, 2006-04-19 12:58

Subject: Default refspec for branches
Message-ID: <625fc13d0604190558tf0e8b69n5f5a830a3131f1d4@mail.gmail.com>
URL: https://gitlist.dev/e/625fc13d0604190558tf0e8b69n5f5a830a3131f1d4%40mail.gmail.com

```
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, 2006-04-19 17:45

Subject: Re: Default refspec for branches
Message-ID: <7v3bg9bgsz.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v3bg9bgsz.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <625fc13d0604190558tf0e8b69n5f5a830a3131f1d4@mail.gmail.com>

```
"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, 2006-04-19 17:52

Subject: Re: Default refspec for branches
Message-ID: <625fc13d0604191052r15226583qf145172cea67429b@mail.gmail.com>
URL: https://gitlist.dev/e/625fc13d0604191052r15226583qf145172cea67429b%40mail.gmail.com
In-Reply-To: <7v3bg9bgsz.fsf@assigned-by-dhcp.cox.net>

```
On 4/19/06, Junio C Hamano <junkio@cox.net> wrote:
> "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

```
