-2

I'm looking for something that may have been committed in a Git repository. I'm using a command like the following:

git grep ABCD `git rev-list --all`

and getting output like

Binary file 9246a896bf37856f37d424dbcb40d14a51b6b315:blah-blah-blah-ABCD-blah-blah matches
Binary file 083407e0ea97796054f614c28808ae9a4fcf2fe8:blah-blah-blah-ABCD-blah-blah matches

How can I find the commit or commits that this relates to?

Humble Hacker
  • 17
  • 1
  • 3

1 Answers1

3

You have it right in front of you: 9246a896bf37856f37d424dbcb40d14a51b6b315 is the commit, and blah-blah-blah-ABCD-blah-blah is the file name.

j6t
  • 9,150
  • 1
  • 15
  • 35
  • Thanks. I looked for that hex string using `git log --branches=*` and didn't find it, so assumed it mustn't be a commit id. But `git log -r 9246a896bf37856f37d424dbcb40d14a51b6b315` shows what I wanted. – Humble Hacker May 19 '21 at 02:02