You can check the git log for all commits of a specific file.
I made a commit to a foo.txt file and now it no longer shows in the git history.
My command:
git log foo.txt
I want to search all commits records for this file, and then find my "lost" commit.