Search code examples
gitrecovery

How can I recover files from disk after git reset --hard


I reset to HEAD but did not stage the changes to the files I was working on.

Can I recover the changes made to the files using disk recovery? Or does git overwrite the files and save to the same location on the disk?


Solution

  • Can I recover the changes made to the LaTeX files using disk recovery?

    That seems your best option (unless you are using an IDE which saves a local history)

    An unstaged change is really never seen by git and cannot be recovered in the git repo.