title: How can I use git log and only output the matching lines?
body: <p>I currently use <code>git log -G "XYZ" -p</code> to search for past changes on certain things, like classes, but often come into the problem where the diff is very large and it makes it difficult to find the actual line where my search term was changed. Is there a way to limit the output to only that line or only the few lines around it?</p>
  
  <hr>
  
  <p>Solution: <code>git grep xyz $(git rev-list --all --max-count=5)</code></p>
  
  <p>--max-count is optional (I needed it to avoid error <code>Argument list too long</code>)</p>