* Strange happening with 'git fetch'
@ 2010-01-07 17:59 David Kirk
2010-01-07 18:07 ` Ilari Liusvaara
0 siblings, 1 reply; 2+ messages in thread
From: David Kirk @ 2010-01-07 17:59 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Strange happening with 'git fetch'
2010-01-07 17:59 Strange happening with 'git fetch' David Kirk
@ 2010-01-07 18:07 ` Ilari Liusvaara
0 siblings, 0 replies; 2+ messages in thread
From: Ilari Liusvaara @ 2010-01-07 18:07 UTC (permalink / raw)
To: David Kirk; +Cc: git
On Thu, Jan 07, 2010 at 11:59:39AM -0600, David Kirk wrote:
> 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?
I have seen that before. Looks like you have local branch 'HEAD' (_not_
the special ref HEAD) on remote side and that is messing it up.
ls-remote'ing the repository shows 'refs/heads/HEAD', right (there's
also HEAD, that's the required special ref)?
-Ilari
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-07 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 17:59 Strange happening with 'git fetch' David Kirk
2010-01-07 18:07 ` Ilari Liusvaara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).