Re: [PATCH] Documentation: warn against merging in a dirty tree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 16, 2008, 00:06 UTC
- Message-ID
- <7vprn57y45.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <32541b130809151653w27d7876fp35e0967d597ae2a9@mail.gmail.com>
"Avery Pennarun" <apenwarr@gmail.com> writes:
> But how do you abort a *failed* merge in a situation like Linus's > example? "git reset --hard HEAD" would destroy the unstaged Makefile > change.
"All of your work tree changes are easily reproducible" implies you do not mind losing them, Ok?
Also "git reset HEAD" (that is, without --hard) would not touch the work tree changes. You need to remove the work-tree cruft left by new files yourself, if you go this route, though. New files are rare enough so it may be more appropriate (and you can "git clean -n $that_subdirectory" to enumerate them).
It all depends on your workflow.