Subject: Re: What's in git.git (stable)

From: Shawn Pearce <[email-masked]>
Date: Thu, 14 Dec 2006 06:45:46 -0500

Andy Parkins <[email-masked]> 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 ^.  :-)
 
--