gnuherds-app-dev
[Top][All Lists]
Advanced

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

Re: mistake on last git push


From: Davi Leal
Subject: Re: mistake on last git push
Date: Fri, 6 Mar 2009 11:12:57 +0100
User-agent: KMail/1.9.9

Nicodemo Alvaro wrote:
> I made an error to the git repository with my last patch I tried to
> make. I am afraid to try a git-reset as the manual says do not do a
> hard reset if you already gave the commit to somebody else. For all I
> know, everybody already got it.

The --hard and --soft Git parameters are not in the man pages of my git-revert 
installation. I have Git version 1.5.6.5!

> The command I think needs to be done if it is still the last commit
> still is: 
>
> git reset --hard HEAD

Yes, I have used this, without the --hard parameter, to revert the last commit 
in the past.


> Is there a better command? Or maybe
>
> git reset --soft HEAD^

I have been told that the command to revert the second to last commit use 
HEAD^ , with ^ , as you advise.


I have checked and the below command does the work perfectly:

  git revert HEAD^


Maybe the --soft is the default behavior, and so it is the same command that 
you advise.  So, go ahead and revert and push it!

P.S.: IMHO the automatically generated description of git-revert should not 
modified, to make it easier later identification.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]