GUGLHUPF <ralfschiff...@tropo.com> writes:
> fairly new to git. Today I did a "git add somefile" and then decided I 
> wanted to unstage it. I did then a "git rm -f somefile". There was no git 
> command in between. Particularly no commit.
>
> git wiped the file from disk. I worked very hard on that file (several 
> days( and I really hope this can be recovered. I could not find a solution 
> on the web. 
>
> For completeness I did a git reset HEAD somefile because that's what I 
> found on the web, but it didn't recover the file. 

One important thing is that the moment you realize the file is missing,
do a complete copy of your working directory and save it some place
safe:  "cp -a working-directory someplace-safe".  Don't do *any* Git
operation -- especially not "git reset" -- before you do that, because
further Git operations run a risk of losing information which is still
stored in some random place in the working directory/archive.

Dale

-- 
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/d/optout.

Reply via email to