git-diff-grep is now deprecated.
Use git log -S<query>
to search in the history for commits that changed . Add an optional -p
to see the diff as well.
This tool will run grep in the last n commit diffs that you specify. Don't like grep? It's easy to change according to your needs.
If you ever:
This tool is for you.
Example: git-diff-grep -c 10 login_required
will grep for login_required in the last 10 commits diffs.
Put it somewhere in your path, and you're good to go.
git-diff-grep [OPTIONS] <query>
Options: -c to specify the number of commits
MIT. Do. Whatever. You. Want.
Feedback welcome. Follow me on Github for more!