Just posting here a solution to a problem I had and could not find easily.

The problem was .. how do I find which commit contained a specific version of a file?

With the file at hand, I could simply use git-hash-object to have its hash

git-hash-object file.pl


Easy enough. The real problem was : how do I find references to this hash?

The only command I found to do that is git whatchanged

git whatchanged

commit 8296847023cf52d9273f59e93da1f18fa1313004
Author: TrucMuche <muche@54c5169c-8210-0410-b4c6-88e7fb53b929>
Date:   Fri Nov 27 13:49:37 2009 +0000

    some stuff

Then just search for the short version of the hash (afb2de5):

commit 8d7e23f9589a2858afd7b4f0f5f8f26c8c440541
Author: TrucMuche <muche@54c5169c-8210-0410-b4c6-88e7fb53b929>
Date:   Mon Nov 16 15:26:57 2009 +0000

    some more stuff

:100644 100644 426edf6... afb2de5... M  path/to/file.pl

If anyone knows a better way let me know :-)