First off, add this to your project's
Now, you're all set, you can now pass
-L :<method>:file to
to see all changes related to a Java method.
Here I want to see all changes related to the
git log -L :call:./core/src/java/org/apache/solr/servlet/HttpSolrCall.java
To get this magic shining for other languages than Java, check out
and the section Defining a custom hunk-header, there you'll see a
list of languages you can add to
If your language is not listed there, you can write your own
function to tell
git log how to identify a method (the man page
shows an example of this).
Happing code searching!