From: Junio C Hamano Date: Tue, 04 Dec 2007 20:46:37 GMT Subject: Re: [RFC] Introduce .git/BRANCH to point to the current branch Message-ID: <7vir3e428i.fsf@gitster.siamese.dyndns.org> In-Reply-To: Jakub Narebski writes: >> Currently, I can do: >> >> # Oh, what did this look like two commits ago? >> $ git checkout HEAD^^ >> # Ah, OK, let's go back to the tip >> $ git checkout branch-name >> ^^^^^^^^^^^ >> But I have to remember and re-type the branch name. > > No, you don't have. You can use > $ git checkout ORIG_HEAD > or > $ git checkout HEAD@{1} But the point is he wants to go back to the branch he came from. He does not want to detach HEAD at the original commit. Having said that, I am not sympathetic to "I have to remember".