Image

Seth Michael Larson: Easily create co-authored commits with GitHub handles

You canadd co-authors to a GitHub commitusing theCo-authored-byfield in the git commit message. But what if your co-author doesn't have a public email address listed on GitHub?

No problem, you can use this handy script to automatically discover a users' display name and per-account "noreply" email address that'll mark their account as a co-author without a public email address.

I've added this script to myPATHin a file namedcoauthoredby, so I can call the script like so:

$ coauthoredby sethmlarson Co-authored-by: Seth Michael Larson <18519037+sethmlarson@users.noreply.github.com>

And this can be used auto-magically with multi line git commits, so if I'm trying to creditQuentin Pradetas a co-author I'd do this:

$ git commit -m "Fixing bugs as usual > > $(coauthoredby pquentin)"

Resulting in this git commit message:

$ git log Author: Seth Michael Larson <sethmichaellarson@gmail.com> Date: Fri Oct 24 11:07:55 2025 -0500 Fixing bugs as usual Co-authored-by: Quentin Pradet <42327+pquentin@users.noreply.github.com>

Thanks for keeping RSS alive! ♥

https://sethmlarson.dev/easy-github-co-authored-by?utm_campaign=rss