13
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 25 May 2026
13 points (100.0% liked)
Git
4672 readers
1 users here now
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Resources
Rules
- Follow programming.dev rules
- Be excellent to each other, no hostility towards users for any reason
- No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.
founded 3 years ago
MODERATORS
Updated OP with what I came up with. I wasn't able to make use of
$GIT_REFLOG_ACTION-- for some reason it was blank in every case, but reading the first line of the existing commit message, if it exists, does the trick.I do foresee a potential problem if you're doing like an interactive rebase for example, and you go to edit a commit message that starts like the default "Revert " style--that could be surprising... Maybe some other cases I haven't thought of too, but yeah, works for me. Thanks for pointing me in the right direction!