I'm no expert, but I'd try:
git reset --hard local_commit
if "local_commit" is some sort of name. Or it can be that long 40
character commit value. If you don't know where you want to go back
to, you might try a
to find the commit value and use it (cut and paste if possible. I
don't like typing "random" 40 character values.)
Well, it's 01:00 local time. You'd think that a 60-year old would know
better than to drink a large caffeinated beverage before bed time.
You'd be wrong, in my case.
BTW, did you mean to do a --mixed (reset HEAD & index) or --soft (only
Note if you did some work between the
git commit local_commit^
git reset --hard
then you can't recover those changes at all. git did not track them
and so they are GONE and totally unrecoverable. The reset --hard reset
both the files in the directory and the index.
On Mon, Apr 29, 2013 at 12:28 AM, lei yang <yanglei.f...@gmail.com> wrote:
> Hi experts
> I commit a change to my local git repos, but I did a git hard --reset
> local_commit^, and then my local changes disappeared, how could I
> recover my local changes ?
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.