How to grep in the git history?

Posted by Ortwin Gentz on Stack Overflow See other posts from Stack Overflow or by Ortwin Gentz
Published on 2010-05-28T11:36:06Z Indexed on 2010/05/28 11:41 UTC
Read the original article Hit count: 237

Filed under:
|
|

I have deleted a file or some code in a file sometime in the past. Can I grep in the content (not in the commit messages)?

A very poor solution is to grep the log:

git log -p | grep

However this doesn't return the commit hash straight away. I played around with "git grep" to no avail.

© Stack Overflow or respective owner

Related posts about git

Related posts about grep