From: Shawn Pearce Date: Thu, 14 Dec 2006 11:45:46 GMT Subject: Re: What's in git.git (stable) Message-ID: <20061214114546.GI1747@spearce.org> In-Reply-To: <200612141136.59041.andyparkins@gmail.com> Andy Parkins wrote: > How's this then: > > $ git commit > $ git commit > $ git commit > $ git reset HEAD^^^ > > "AGGGHHHHHH! I meant HEAD^^" > > At this point I start running "git-prune -n | grep commit" and some liberal > use of git-show to try and find the hash of the object so I can do At this point I usually try to politely suggest that users do: git repo-config --global core.logAllRefUpdates true and in the future do something like: > $ git commit # {4} > $ git commit # {3} > $ git commit # {2} > $ git reset HEAD^^^ # {1} > > "AGGGHHHHHH! I meant HEAD^^" $ git reset HEAD@{4} should give you what $ git reset HEAD^^ would have given had you not added the extra ^. :-) --