Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2008, 20:11 UTC
- Message-ID
- <7vlk0tz33n.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <32541b130806251304u39c8ffdenc52904391aebd089@mail.gmail.com>
"Avery Pennarun" <apenwarr@gmail.com> writes:
> How about making "git checkout" default to HEAD if no revision is > supplied? There's precedent for this in, say, git-diff (and I think a > few others).
Won't fly. 'git checkout -- "$@"' is to revert to the last staged version.
* You say "git checkout branch" when you want to "check out that branch";
* You say "git checkout -- file" when you want to "check out the file from the index";
* You say "git checkout v1.5 -- file" when you want to "check out the file out of that revision".
It's not that hard.