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

2015-09-09 Thread Junio C Hamano
Jeff King writes: > The "simplest" way to do that is: > > rm .git/refs/heads/master > > but that is not guaranteed to work in future versions of git, and I > wouldn't recommend it in general. Yeah, "git checkout -b" has a stronger sibling "git checkout -B" (i.e. I know that the named branch al

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

2015-09-09 Thread Jeff King
On Wed, Sep 09, 2015 at 01:34:03AM -0700, davilda_ wrote: > i'm new with git and i just want to cancel a commit. I just do git add and > git commit. > How can i canceled a commit in my case. Usually with "git reset HEAD^". But I'm guessing from your subject line that you tried that, and it did no

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

2015-09-09 Thread davilda_
Hi, i'm new with git and i just want to cancel a commit. I just do git add and git commit. How can i canceled a commit in my case. Best regards -- View this message in context: http://git.661346.n2.nabble.com/fatal-ambiguous-argument-HEAD-unknown-revision-or-path-not-in-the-working