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

Per-remote tracking branch

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 15, 2009, 15:29 UTC
Message-ID
<vpq4or48bux.fsf@bauges.imag.fr>
Hi,

Is there a way, with Git, to specify a tracking branch on a per-remote basis?

At the moment, I can configure a tracking branch to let me just type
$ git pull
when I want to say
$ git pull origin master

Now, assume I have another remote "foo", I'd like to be able to just say

$ git pull foo
and put something in my .git/config so that Git knows I mean
$ git pull foo master
Is there a simple way to do that?

(for the motivation: I mostly use Git with a 1-branch-per-repo setup, so in 99% of my use-cases, when I have to specify a branch, it's master).

Thanks,
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Next: Jeff King
Message 1 of 6 in “Per-remote tracking branch”
  1. Matthieu MoySep 15, 2009
  2. Jeff KingSep 24, 2009
  3. Matthieu MoySep 24, 2009
  4. Björn SteinbrinkSep 24, 2009
  5. Björn SteinbrinkSep 24, 2009
  6. Matthieu MoySep 24, 2009

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.