How to recover from "reset --hard"

2 messages, 1 author, 2016-06-15 · open the first message on its own page

How to recover from "reset --hard"

From: Ping Yin <hidden>
Date: 2016-06-15 22:47:17

After adding a file to index, i do a "reset --hard", then how do i
recovery the file?

I want write all lost files to a directory and find it according to
the file size.

Does "git fsck --lost-found" write this file to .git\lost-found\other ?

Ping Yin

Re: How to recover from "reset --hard"

From: Ping Yin <hidden>
Date: 2016-06-15 22:47:17

On Sat, Aug 22, 2009 at 10:53 AM, Ping Yin[off-list ref] wrote:
After adding a file to index, i do a "reset --hard", then how do i
recovery the file?

I want write all lost files to a directory and find it according to
the file size.

Does "git fsck --lost-found" write this file to .git\lost-found\other ?
It does. I just remembered the wrong size of the file. Sorry for the noise.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help