Git: resurrect staged, but not committed files

Posted . Visible to the public.

See all blobs and commits that are not committed

git fsck --lost-found

Look at the content of a dangling blob by SHA

git show blob_sha

Restore into a temporary file

git show SHA1 > temp.file

OPTIONAL
Force clean-up and compact
git gc

Sean Feldman
Last edit
Sean Feldman
Posted by Sean Feldman to Sean Feldman's deck (2015-12-23 16:28)