Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

71%
+3 −0
Q&A How can I filter GitHub commits by date range, in a friendlier way than git log?

Include diffs in the log I would like to easily review commits in that date range […] I know that from the command line I can use git log with --since and --until options, but that just gets me...

posted 1y ago by Michael‭

Answer
#1: Initial revision by user avatar Michael‭ · 2025-07-31T13:45:55Z (about 1 year ago)
## Include diffs in the log
> I would like to easily review commits in that date range [&hellip;]
>
> I know that from the command line I can use `git log` with `--since` and `--until` options, but that just gets me a log -- a list of commit hashes and messages -- on my local machine. In order to see what happened, I have to jump through some extra hoops [&hellip;]

If "review" just means "look at," you can add the `-p` (`--patch`) flag to your `git log` command to include the diff of the files each commit affected.

## Arbitrary log formats
But since the ellipses I dropped are about other team members, I imagine "review" means "annotate with comments on the upstream remote." You can format `git log` [pretty freely][pretty-format]. If your terminal supports clickable links, you could do something like this:

```sh
git log --since=foo --until=bar --format=tformat:'%Cred%s%Creset%nhttps://github.com/codidact/qpixel/commit/%H'
```

Favorite log formats can easily be aliased to presets, and you can always throw additional non-conflicting `git log` arguments like `--since`, `--until`, or `-p` into the CLI when calling your preset.
For example:

```ini
[alias]
	# Pretty logs
	lg-links = log ---format=tformat:'%Cred%s%Creset%nhttps://github.com/codidact/qpixel/commit/%H'
```

```sh
git lg-links --since=2023-10-01 --until=2023-10-04 --graph
```

## Just use GitHub
As [Moshi points out][moshi], GitHub has some filtering options for its log pages, even if there aren't links to them.

<pre><code><a href="https://github.com/codidact/qpixel/commits/develop?since=2023-10-01&until=2023-10-04">https://github.com/codidact/qpixel/commits/develop?since=2023-10-01&until=2023-10-04</a></code></pre>


[^lg]: For instance, I have `git lg` aliased to `log --graph --date=auto:human --format=tformat:'%C(bold yellow)%h%C(reset) %C(green)%ad%C(reset) %s %C(dim white)%aN%C(reset) %w(0,0,9)%C(auto)%+d%C(reset)'` and `git lg2` to `log --graph --format=tformat:'%C(bold yellow)%h%C(reset) %C(cyan)%aD%C(reset) %C(green)(%ar) %C(dim white)%aN%C(reset)%w(0,0,9)%n %C(brightwhite)%s%C(auto)%+d%C(reset)%w(0,0,10)%+b'`

[pretty-format]: https://git-scm.com/docs/pretty-formats
[moshi]: https://powerusers.codidact.com/comments/thread/8706