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.

Comments on How can I filter GitHub commits by date range, in a friendlier way than git log?

Post

How can I filter GitHub commits by date range, in a friendlier way than git log?

+2
−0

We have a repository hosted on GitHub. I'm trying to track down a bug and have narrowed the date range for when it could have been introduced. I would like to easily review commits in that date range, and ideally I'd like to get other team members to help in this review.

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 client-side, and that's a necessarily solitary activity.

What I would like, instead, is a way to produce that list on the web, with the commit hashes being links to the commits like they are in the full history on GitHub, so that it's easy to browse the many commits in the date range to get a sense of what changed and zero in on the likely suspects. If I could do this on the web, I could share links to specific changes of possible interest with team members who are better qualified than I am to evaluate them.

I searched for a solution and found more people with my problem, but no answer. I found an open issue for a third-party package requesting search by date range, but nothing for GitHub itself.

How can I see GitHub commits in a date range with GitHub's usual convenient links and changelists/diffs?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

4 comment threads

Why not bisect? (2 comments)
Software Development (2 comments)
[`https://github.com/codidact/qpixel/commits/develop?since=2023-10-01&until=2023-10-04`](https://gith... (2 comments)
Not a solution, but maybe a partial workaround (1 comment)
Not a solution, but maybe a partial workaround
Canina‭ wrote 6 months ago · edited 6 months ago

I seem to recall that you use Mac OS X. If you're running that git command in a terminal, you might be able to use awk to transform the commit hashes into usable links. Try something like:

$ git log | awk '/^commit/ { print "https://github.com/codidact/qpixel/commit/"$2 }'

You can do the same thing also for example with sed:

$ git log | grep ^commit | sed -e 's,^commit ,https://github.com/codidact/qpixel/commit/,g'

If you want more context, just omit the grep from the latter:

$ git log | sed -e 's,^commit ,https://github.com/codidact/qpixel/commit/,g'

Or for that matter just about any other text stream transformation tool which you might have handy.

(Yes, I'm assuming a repository. Adjust as needed.)