git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git reset --hard in .git causes a checkout in that directory
@ 2009-12-03 11:30 Maarten Lankhorst
  2009-12-04 11:11 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Maarten Lankhorst @ 2009-12-03 11:30 UTC (permalink / raw)
  To: git

Hi all,

When I was working on my code and made a mess that I wanted to undo, I 
accidentally did it in the .git directory, and had a whole clone of my 
last committed tree there.

It can be triggered easily:

mkdir test; cd test; git init; touch foo; git add foo; git commit -m 
'add foo'; cd .git; git reset --hard; [ -f foo ] && echo hello beauty

Other parts of git could be affected, I haven't checked where exactly 
the bug hides, so I was afraid to send in a patch

Cheers,
Maarten

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

end of thread, other threads:[~2009-12-06  7:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 11:30 git reset --hard in .git causes a checkout in that directory Maarten Lankhorst
2009-12-04 11:11 ` Jeff King
2009-12-04 17:25   ` Junio C Hamano
2009-12-05 18:24     ` Junio C Hamano
2009-12-06  4:15       ` Jeff King
2009-12-05 19:06   ` Junio C Hamano
2009-12-06  4:18     ` Jeff King
2009-12-06  7:54       ` Junio C Hamano

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