17

I recommend to look into git log --help and git rev-list --help .

I just created 2 scripts to list commits from Git repositories. It's more in the score of an alias actually, so nothing comprehensive here. If you have some one-liners, alias or scripts for commits listing, please share here. The link of this post goes to the git log documentation. I'll share mine in the comments too rather than in the post.

you are viewing a single comment's thread
view the rest of the comments
[-] proxymint@programming.dev 7 points 1 week ago

git log -S'some_string' -p is the one that pays for itself. it finds the commits where that string was added or removed, so you can track down when a function disappeared without reading through history. -G is the same idea with a regex, matching any changed line.

and git log --follow -p path/to/file keeps going across renames, which plain git log file won't do.

this post was submitted on 05 Nov 2026
17 points (94.7% liked)

Programming

29306 readers
493 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS