I frequently use git stash
and git stash pop
to save and restore changes in my working tree. Yesterday I had some changes in my working tree that I
Recovered it by using following steps:
Identify the deleted stash hash code:
gitk --all $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
Cherry Pick the Stash:
git cherry-pick -m 1 $stash_hash_code
Resolve Conflicts if any using:
git mergetool
Additionally you might be having issues with commit message if you are using gerrit. Please Stash your changes before following next alternatives: