Can you recover uncommitted changes lost by `git reset --hard` or `git checkout .`?
IntermediateConceptUndoing changes: reset, revert, restore and reflog
Answer
Not from the reflog, since they were never committed. Anything that was ever staged (git add) exists as a dangling blob and can be found with git fsck --lost-found. Unstaged edits are gone unless an IDE local history has them.
git fsck --lost-found
ls .git/lost-found/other
More on Undoing changes: reset, revert, restore and reflog
What are the three modes of `git reset`?BeginnerWhat is the difference between `git reset` and `git revert`?BeginnerHow do you discard changes in one file?BeginnerHow do you recover a commit after `git reset --hard`?IntermediateWhat does `git commit --amend` do to the reflog and to the old commit?IntermediateHow do you undo `git add` for a file?Beginner