I have a file taken from a repository some time in the distant past. Is there a way to tell what commit this file is related to?
I am well aware of the commit history. That's not what I am asking. I am asking to find what was the commit associated with that specific file version. I don't know what changed with respect to the previous commit, nor what changed in the following commit, so a simple history does not do the trick.
A brute-force check would be to systematically check out every commit and compare the file in the repository to the outdated copy I have, until I find the matching commit.