git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Many different remote branch sources

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 2, 2007, 15:47 UTC
Message-ID
<Pine.LNX.4.63.0703021645200.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<81b0412b0703020253i3e1478a9pf505c0d95442536c@mail.gmail.com>
Hi,
On Fri, 2 Mar 2007, Alex Riesen wrote:
Show 19 quoted lines
> 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

Previous: Alex RiesenNext: Alex Riesen
Message 2 of 3 in “Many different remote branch sources”
  1. Alex RiesenMar 2, 2007
  2. Johannes SchindelinMar 2, 2007
  3. Alex RiesenMar 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.