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.

  • proxymint@programming.dev
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    7 days 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.