Undo git reset --hard with uncommitted files in the staging area
I am trying to recover my work. I stupidly did git reset --hard , but before that I've done only get add . and didn't do git commit . Please help! Here is my log: MacBookPro:api user$ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # modified: .gitignore ... MacBookPro:api user$ git reset --hard HEAD is now at ff546fa added new strucuture for api Is it possible to undo git reset --hard in this situation? Mark Longair You should be able to recover any files back that you added to the index (e.g, as in your situation, with git add . )