> For the complete documentation index, see [llms.txt](https://yu-sun.gitbook.io/essential-git-for-scientists/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yu-sun.gitbook.io/essential-git-for-scientists/advanced-concepts/log-filter.md).

# 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&#x20;

* 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.&#x20;

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