Is there any way to recover uncommitted changes to the working directory from a git reset --hard HEAD
?
I found out the hard way that any uncommitted files before a git reset --hard
gets removed from git history. However, I was lucky enough to have kept my code editor session open during the entire time I was pulling my hair out, that I discovered that a simple control + z
in each of the affected files returned the state of the file back to the version before Git so obligingly reset everything I didn't ask it to specifically. Hooray!!