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

Re: 'upstream' branches.

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 5, 2007, 17:44 UTC
Message-ID
<20070505174416.GA2898@steel.home>
In-Reply-To
<1178368166.11851.60.camel@pmac.infradead.org>
David Woodhouse, Sat, May 05, 2007 14:29:26 +0200:
Show 5 quoted lines
> [remote "origin"]
>         url = ssh://git.infradead.org/~/public_git/foo-2.6.git
>         fetch = +refs/heads/*:refs/remotes/origin/*
> 	fetch = +refs/heads/mtd:refs/heads/mtd
> 	fetch = +refs/heads/linus:refs/heads/linus

These pluses request overwriting of the local reference even if it has more commits than the remote ("is newer"). Are you sure you want that?

Show 5 quoted lines
> What I have at the moment isn't ideal because I think pulling from the
> 'mtd' tree will fail if the 'linus' branch there is older than the local
> clone's 'linus' branch. But it mostly works.
> 
> Is there a better way?

I would just remove the pluses. git-fetch will say that the branch is already up-to-date, if the local branch already has everything the remote has.

Previous: David WoodhouseNext: David Woodhouse
Message 2 of 13 in “'upstream' branches.”
  1. David WoodhouseMay 5, 2007
  2. Alex RiesenMay 5, 2007
  3. David WoodhouseMay 5, 2007
  4. Alex RiesenMay 5, 2007
  5. Junio C HamanoMay 6, 2007
  6. David WoodhouseMay 6, 2007
  7. Junio C HamanoMay 6, 2007
  8. David WoodhouseMay 6, 2007
  9. Junio C HamanoMay 7, 2007
  10. David WoodhouseMay 7, 2007
  11. Alex RiesenMay 6, 2007
  12. Junio C HamanoMay 7, 2007
  13. Alex RiesenMay 7, 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.