Re: fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please, don't top post, it's difficult to follow a "reversed" conversation.

On Thu, Oct 28, 2010 at 3:54 PM, Todd Wells <ttopwells@xxxxxxxxx> 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 <ttopwells@xxxxxxxxx>)
> Reflog message: commit: convert mason template to use
> ProjectService.getAllGroups()
> Author: Todd Wells <ttopwells@xxxxxxxxx>
> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]