Find lost files

Git, Repository · Apr 13, 2021

Prints a list of lost files and commits.

  • Use git fsck --lost-found to print a list of all dangling objects.
  • All appropriate files will be extracted into the .git/lost-found directory.
git fsck --lost-found
git fsck --lost-found
# dangling commit 3050fc0de
# dangling blob 807e3fa41
# dangling commit 59ff8481d

Written by Angelos Chalaris

I'm Angelos Chalaris, a JavaScript software engineer, based in Athens, Greece. The best snippets from my coding adventures are published here to help others learn to code.

If you want to keep in touch, follow me on GitHub or Twitter.

More like this