Use the git index file parser <https://pypi.python.org/pypi/gin> (python3).
pip3 install gin
gin ~/git-repo/.git/indexRecover name and sha1 hash of every file listed in the index, and use the same process above to recover the file.
$ gin .git/index | egrep -e "name|sha1"
name = AWS Amazon Bucket S3/README.md
sha1 = 862a3e58d138d6809405aa062249487bee074b98
name = CRLF injection/README.md
sha1 = d7ef4d77741c38b6d3806e0c6a57bf1090eec141Source: Insecure Source Code Management/Git.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.