Sunday, June 12, 2022

How to recover dropped git stash

1. Get list of the stashes:

     git fsck --unreachable | grep commit | cut -d" " -f3 | xargs git log --merges --no-walk --grep=WIP

2. Find needed commit_hash in the list

3. Run >git stash apply <commit_hash>


No comments:

Post a Comment