git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-checkout changes the index but not the checked out files?
@ 2007-04-22 23:25 Martin Langhoff
  2007-04-22 23:30 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Langhoff @ 2007-04-22 23:25 UTC (permalink / raw)
  To: Git Mailing List

I am a bit confused by git-checkout behaviour in the following scenario.

$ git version
git version 1.5.1.gf8ce1

$ git-branch
  mdl17-polhn
* mdl18-local
  mdl18-topnz

$ git-status
<shows a clean status>

# checkout an upstream branch to test that it has a bug
$ git-checkout origin/MOODLE_18_STABLE
$ git-status
<shows a clean status>

# switch back to our local branch to test that the bug is gone
$ git-checkout mdl18-local
$ git-status
<shows a very dirty status - the index has changed but the files
weren't updated to the contents of mdl18-local>
$ git-reset --hard # this fixes things back to normal

Is the bug in git-checkout or in my understanding? ;-) Perhaps I am
modelling my use of git-checkout on how I used cg-switch and that's
wrong. But reading the man page, it says:

When <paths> are not given, this command switches branches by
updating the index and working tree to reflect the specified
branch, <branch>, and updating HEAD to be <branch>

cheers,


martin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-04-23 20:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-22 23:25 git-checkout changes the index but not the checked out files? Martin Langhoff
2007-04-22 23:30 ` Junio C Hamano
2007-04-23  0:17   ` Martin Langhoff
2007-04-23  0:30     ` Junio C Hamano
2007-04-23  0:45       ` Martin Langhoff
2007-04-23 14:53         ` Linus Torvalds
2007-04-23 20:16           ` Martin Langhoff
2007-04-23 18:35         ` Uwe Kleine-König

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).