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

git pull on a branch semantics

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Jan 22, 2006, 20:58 UTC
Message-ID
<20060122205852.255.qmail@web31812.mail.mud.yahoo.com>
Hi,

pwd is a git repo; current branch is A; there's a few branches in this git repo. In .git/remotes/ I've a file name "projectC", which looks like:

URL:<url> Pull:projectC:projectC Push:projectC:projectC

That is both here and remotely I've projectC being a branch here and remotely.

I'd like to pull changes to projectC only, from the remote projectC to the local projectC, but my current branch is A.

I blissfully do:
git pull projectC

git correctly tells me that the heads are the same in branchC here and remote, but it then goes ahead to merge projectC in the current branch A (project A) since they have a common ancestor.

But because of the "Pull" line in .git/remotes/projectC what the intention was is to pull from projectC remotely and merge any new changes in projectC locally, and only in projectC (irrespective of what the current branch is (in the pwd)).

Is this behavior a bug or is this a "feature"?
Thanks,
   Luben
Next: Junio C Hamano
Message 1 of 3 in “git pull on a branch semantics”
  1. Luben TuikovJan 22, 2006
  2. Junio C HamanoJan 22, 2006
  3. Luben TuikovJan 24, 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.