Last Updated: July 24, 2020
·
2.616K
· matthewmccullough

Git log searching

Git treats history like a searchable database. Dates and content can be query parameters. Let's look at a few examples:

Only show commit history earlier than one year ago:

git log --since=1.year.ago

Only show commits that contain content changes with the word nowrap:

git log -S nowrap

Only show commits that added new files:

git log --diff-filter=A