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

Strange happening with 'git fetch'

From
DKDavid Kirk <davemkirk@gmail.com>
Date
Jan 7, 2010, 17:59 UTC
Message-ID
<de73f1891001070959h30e4ecebw7c852f0417647419@mail.gmail.com>

This is very strange, and defies the understanding of everyone in the office familiar with git.  Is it a bug, or some feature we don't understand?

Basically, when I do a 'git fetch', it updates my local repository. Now nobody else is doing anything, so the remote repository does not change.  Doing another 'git fetch' should report that nothing needs to be done and nothing should change.  But instead, it reports something about the remote HEAD, and changes my local branch 'master' to some strange location!  Running 'git fetch' again restores it to the correct state, reporting that it is updating 'master'.  Repeated invocations will toggle between these two results.  Below is a transcript from the bash shell.

Can someone please explain this?
---- bash console ----
dkirk@RI-ENG-21 /c/Dev/TSWeb2 (master)
$ git fetch
From //10.18.0.53/git/repos/WebTrading
 + 03c60a4...209b0bc HEAD       -> origin/HEAD  (forced update)
dkirk@RI-ENG-21 /c/Dev/TSWeb2 (master)
$ git fetch
From //10.18.0.53/git/repos/WebTrading
 + 209b0bc...03c60a4 master     -> origin/master  (forced update)
dkirk@RI-ENG-21 /c/Dev/TSWeb2 (master)
$ git fetch
From //10.18.0.53/git/repos/WebTrading
 + 03c60a4...209b0bc HEAD       -> origin/HEAD  (forced update)
dkirk@RI-ENG-21 /c/Dev/TSWeb2 (master)
$ git fetch
From //10.18.0.53/git/repos/WebTrading
 + 209b0bc...03c60a4 master     -> origin/master  (forced update)

Thanks, -David

Next: Ilari Liusvaara
Message 1 of 2 in “Strange happening with 'git fetch'”
  1. David KirkJan 7, 2010
  2. Ilari LiusvaaraJan 7, 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.