chingmeng
9/25/2018 - 5:37 AM

Recover deleted file from unreachable commit

Recover deleted file from unreachable commit

Get the list of deleted commit, blobs
git fsck --unreachable 

Look for the commit (look for sha) you want, and use the command to show what's inside
git show SHA_ID

Recover using the sha retrieve and command below
git stash apply <sha>

source
[Solved: Retrieve a deleted stash](https://community.atlassian.com/t5/Sourcetree-questions/Retrieve-a-deleted-stash/qaq-p/162673)