From: Maarten Lankhorst <m.b.lankhorst@gmail.com>
To: git@vger.kernel.org
Subject: git reset --hard in .git causes a checkout in that directory
Date: Thu, 03 Dec 2009 12:30:46 +0100 [thread overview]
Message-ID: <4B17A166.60306@gmail.com> (raw)
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
next reply other threads:[~2009-12-03 11:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 11:30 Maarten Lankhorst [this message]
2009-12-04 11:11 ` git reset --hard in .git causes a checkout in that directory 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B17A166.60306@gmail.com \
--to=m.b.lankhorst@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).