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

Default refspec for branches

From
JBJosh Boyer <jwboyer@gmail.com>
Date
Apr 19, 2006, 12:58 UTC
Message-ID
<625fc13d0604190558tf0e8b69n5f5a830a3131f1d4@mail.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
Next: Junio C Hamano
Message 1 of 3 in “Default refspec for branches”
  1. Josh BoyerApr 19, 2006
  2. Junio C HamanoApr 19, 2006
  3. Josh BoyerApr 19, 2006

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.