3

Is it possible to find in which commit a certain version of a binary file is?

I'm thinking something like:

$ sha1sum mybinaryfile
2fc60fcc4a92a2b171db333b482dabf94c82d51f  mybinaryfile

$ git tell-me-which-commit-has 2fc60fcc4a92a2b171db333b482dabf94c82d51f
commit fc8d840778024557faf6bd2d93c56a2b4be55ab1
Author: author <author@here.com>
Date:   Wed Feb 19 15:41:06 2014
llekn
  • 3,271
  • 2
  • 18
  • 23
  • Yes, it is duplicate, but unfortunately the shell script that is posted as first answer doesn't work for me... Anyway I managed to extract some ideas from there, thank you! – llekn Feb 19 '14 at 19:56
  • It is quite probable that a particular blob exists in more than one commit - which one do you want? The one that created it? The last one where it appeared? All of them? – twalberg Feb 19 '14 at 21:27
  • I was looking for any commit that has it... But it is interesting to find the first commit on where this blob appeared and the last one. Any idea on how to do this? – llekn Feb 20 '14 at 01:01

0 Answers0