# Many different remote branch sources

3 messages from 2007-03-02 to 2007-03-02. Participants: Alex Riesen, Johannes Schindelin.
Thread: https://gitlist.dev/t/7047

## Alex Riesen, 2007-03-02 10:53

Subject: Many different remote branch sources
Message-ID: <81b0412b0703020253i3e1478a9pf505c0d95442536c@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0703020253i3e1478a9pf505c0d95442536c%40mail.gmail.com

```
The following does not seem to work:

  [remote "dev1"]
    url = ...
    fetch = ...
  [remote "dev2"]
    url = ...
    fetch = ...

  [branch "integration"]
    remote = dev1
    merge = refs/heads/topic1

  [branch "integration"]
    remote = dev2
    merge = refs/heads/topic2

How can I specify that a branch has more then one
remote branch it can be merged with?

```

## Johannes Schindelin, 2007-03-02 15:47

Subject: Re: Many different remote branch sources
Message-ID: <Pine.LNX.4.63.0703021645200.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0703021645200.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <81b0412b0703020253i3e1478a9pf505c0d95442536c@mail.gmail.com>

```
Hi,

On Fri, 2 Mar 2007, Alex Riesen wrote:

> The following does not seem to work:
> 
>  [remote "dev1"]
>    url = ...
>    fetch = ...
>  [remote "dev2"]
>    url = ...
>    fetch = ...
> 
>  [branch "integration"]
>    remote = dev1
>    merge = refs/heads/topic1
> 
>  [branch "integration"]
>    remote = dev2
>    merge = refs/heads/topic2
> 
> How can I specify that a branch has more then one
> remote branch it can be merged with?

The branch.<branchname> information is purely for determining what you 
want to do when saying "git pull" (without other arguments).

In your case, I'd strongly advise against using this construct, since you 
don't want to merge with dev1 and dev2 _at the same time_.

Rather, add a "fetch = refs/heads/topic1" at the _top_ of the remotes.dev1 
section, and say "git pull dev1" when you want to pull from dev1.

Ciao,
Dscho

```

## Alex Riesen, 2007-03-02 22:18

Subject: Re: Many different remote branch sources
Message-ID: <81b0412b0703021418y6ff084d1r9eaf72aeac4eb51@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0703021418y6ff084d1r9eaf72aeac4eb51%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0703021645200.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
On 3/2/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Rather, add a "fetch = refs/heads/topic1" at the _top_ of the remotes.dev1
> section, and say "git pull dev1" when you want to pull from dev1.

This is exactly what I wanted. I just somehow believed that
git pull uses only references configured in branch sections,
never the references in "remote" sections. Am a bit confused.

```
