From: "Santi Béjar" <santi@agolina.net>
To: Todd Wells <ttopwells@gmail.com>
Cc: misfire@debugon.org, "SZEDER Gábor" <szeder@ira.uka.de>,
git@vger.kernel.org
Subject: Re: fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree.
Date: Thu, 28 Oct 2010 16:01:45 +0200 [thread overview]
Message-ID: <AANLkTikLOU6HYzDD79eDfPnicQ8X1jTkLGAikAoy3YG-@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=QODz+Gf9hwrdu6b900CzuO-BBnF2zmLWOGFpy@mail.gmail.com>
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@gmail.com> 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@gmail.com>)
> Reflog message: commit: convert mason template to use
> ProjectService.getAllGroups()
> Author: Todd Wells <ttopwells@gmail.com>
> 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
next prev parent reply other threads:[~2010-10-28 14:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 13:09 fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree Todd Wells
2010-10-28 13:41 ` SZEDER Gábor
2010-10-28 13:42 ` Mathias Lafeldt
2010-10-28 13:42 ` Santi Béjar
[not found] ` <AANLkTi=QODz+Gf9hwrdu6b900CzuO-BBnF2zmLWOGFpy@mail.gmail.com>
2010-10-28 14:01 ` Santi Béjar [this message]
2015-09-09 8:34 ` davilda_
2015-09-09 9:20 ` Jeff King
2015-09-09 16:24 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2007-06-08 10:08 fatal: ambiguous argument 'HEAD': " Thomas Glanzmann
2007-06-08 10:15 ` Junio C Hamano
2007-06-08 10:21 ` Thomas Glanzmann
2007-06-08 10:33 ` Junio C Hamano
2007-06-08 10:38 ` Thomas Glanzmann
2007-06-08 10:27 ` Junio C Hamano
2007-06-10 8:54 ` carbonated beverage
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikLOU6HYzDD79eDfPnicQ8X1jTkLGAikAoy3YG-@mail.gmail.com \
--to=santi@agolina.net \
--cc=git@vger.kernel.org \
--cc=misfire@debugon.org \
--cc=szeder@ira.uka.de \
--cc=ttopwells@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).