When you pair with someone, their name belongs on the commit too. GitHub reads a Co-authored-by line for that, and git has an option that puts it in the right place.
git commit -m "Add export button" \
--trailer "Co-authored-by: Bob <[email protected]>"
Trailers are the Key: value lines at the very end of a commit message, after a blank line. --trailer adds one for you, with the blank line and the spacing done right, which is the part I think is easiest to get wrong by hand. You can repeat it for more people or other keys:
git commit -m "Fix login" --trailer "Reviewed-by: Eve <[email protected]>" --trailer "Fixes: #123"
Git can also read them back out. git log --format='%(trailers:key=Reviewed-by,valueonly)' prints only the reviewers, which makes simple statistics or release notes easy.
GitHub shows extra avatars for Co-authored-by trailers, but only when the email belongs to a GitHub account, so use the address that person uses there. A noreply address works too.
Be careful with git commit --amend afterwards: if you edit the message and type text after the trailers, they’re no longer the last paragraph and tools stop seeing them. Keep them as the final block.
Further reading: git-commit documentation, git-interpret-trailers documentation, GitHub: creating a commit with multiple authors
Going deeper: Moving on from hdtv: how to export your TV show list to Trakt.tv