From: Santi Béjar Date: Thu, 28 Oct 2010 14:01:45 GMT Subject: Re: fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree. Message-ID: In-Reply-To: Please, don't top post, it's difficult to follow a "reversed" conversation. On Thu, Oct 28, 2010 at 3:54 PM, Todd Wells wrote: > Thanks all of you for your speedy responses. > git log -g does indeed show my previous commits, for example: > > Reflog: HEAD@{0} (Todd Wells ) > Reflog message: commit: convert mason template to use > ProjectService.getAllGroups() > Author: Todd Wells > Date:   Thu Oct 28 05:54:22 2010 -0700 >     convert mason template to use ProjectService.getAllGroups() > commit b80ed79669c56669f05175db9eb9eba4a5fb296e > // ...etc > > > But I'm not quite sure now if I should do  'git reset --hard yourbranch@{1}' > or 'git reset HEAD@{0}' or something else. HEAD@{0} = HEAD so for sure it is not what you want. You should first examine the commit history with "git log" or better with gitk: gitk HEAD@{1} or gitk HEAD@{2} and when you are sure: git reset --hard HEAD@{n} (Note that all local changes in the worktree will be lost). HTH, Santi