Log filter

How to filter results in the commit history?

There are various arguments you can add to git log. Here are some commonly used attributes you can filter on

  • Author

    • git log --author="Jason"

  • Date

    • git log --since="2023-07-22"

    • git log --before="2023-06-01"

    • git log --after="1998-05-30"

  • Messege

    • git log --grep="bug"

  • File

    • git log -- analyse.py

You can combine these filters, e.g.

git log --author="David Johns" --before="2023-07-20" --after="2020-01-01" --grep="registration"

Last updated