Searching commit string in git log

suggest change

Searching git log using some string in log:

git log [options] --grep "search_string"

Example:

git log --all --grep "removed file"

This searches commit messages on every ref for removed file.


Starting with Git 2.4, --invert-grep inverts the search.

Example:

git log --grep="add file" --invert-grep

Will show all commits that do not contain add file.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents