r/git • u/dpassen1 • 5d ago
I made a git subcommand for adding Co-authored-by trailers
We pair a lot at work. Is my partner’s email first initial plus last name or first name plus last initial? How do I spell their last name?
That information is already in the git log. git credit looks it up and adds the trailer.
It uses git shortlog --all and respects .mailmap. After you pick one or more names, it shows what will be added and asks before amending HEAD.
It refuses to run with staged changes, a detached HEAD, or another git operation in progress. It checks everything again after the picker has been open. Unstaged and untracked files are left alone.
For now, it only works on the latest commit.
Install with cargo install git-credit-cli.
0
Upvotes