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

Re: origin/branchname and tracking branch pointing to different commits?

From
ESEugene Sajine <euguess@gmail.com>
Date
Jun 8, 2010, 17:50 UTC
Message-ID
<AANLkTilfBqc3Qww-4MbAcxuqBIj0LdbW9R3QXjCiy_J4@mail.gmail.com>
In-Reply-To
<7vljaptp1j.fsf@alter.siamese.dyndns.org>
Show 16 quoted lines
>
> In your transcript, they can say "git fetch" (or "git fetch origin") and
> branch is copied to origin/branch, so instead of doing:
>
>    $ git fetch origin branchname
>    $ git log FETCH_HEAD ;# or whatever inspection using FETCH_HEAD
>
> they can do
>
>    $ git fetch ;# or git fetch origin
>    $ git log origin/branch ;# or whatever inspection using it
>
> In short, teach them that they no longer have reason to learn or run "git
> fetch origin branchname".
>
>
Junio,

Yes, that's pretty much what we are doing. we are using "git fetch origin" to update local remote branches (remote/branch) and then use the information in there to inspect what are the incoming changes. I was never teaching anybody to use "git fetch origin branch" So, we are on the same page here with you.

The confusion though is that "git pull origin master" uses FETCH_HEAD to store the information about remote master branch instead of origin/master branch. Therefore when people are using pull - they get confused why this branch (origin/master) was not updated. Do you think that FETCH_HEAD usage for pull still makes sense?

Thanks, Eugene

Previous: Junio C HamanoNext: Jeff King
Message 9 of 14 in “origin/branchname and tracking branch pointing to different commits?”
  1. Eugene SajineJan 7, 2010
  2. Matthieu MoyJan 7, 2010
  3. Thomas RastJan 7, 2010
  4. Eugene SajineJan 7, 2010
  5. Eugene SajineJan 7, 2010
  6. Junio C HamanoJan 8, 2010
  7. Eugene SajineJun 8, 2010
  8. Junio C HamanoJun 8, 2010
  9. Eugene SajineJun 8, 2010
  10. Jeff KingJun 8, 2010
  11. Eugene SajineJun 28, 2010
  12. Junio C HamanoJun 29, 2010
  13. Eugene SajineJun 29, 2010
  14. Jeff KingJun 29, 2010

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.