From: Junio C Hamano Date: Wed, 25 Jun 2008 20:11:56 GMT Subject: Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to Message-ID: <7vlk0tz33n.fsf@gitster.siamese.dyndns.org> In-Reply-To: <32541b130806251304u39c8ffdenc52904391aebd089@mail.gmail.com> "Avery Pennarun" 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.