Is there any way to recover uncommitted changes to the working directory from a git reset --hard HEAD
?
This is what I usually do if I lose some changes.
git reflog
git checkout // now you are in where you want but you cannot push from detached branch to master
manually copy and paste changes from detached branch to master or working branch
git reset --hard HEAD // if needed
git add ... > git commit ... > git push ...
to move the pointer back to your previous commits but keeping the changes you made so far in your latest commits checkout git reset --soft dadada