Add a Git co-author credit with “Co-authored-by” in your commit message
If you add the following lines to your commit message, the GitHub UI will show them as co-authors:
Co-authored-by: your name <your git email>
Co-authored-by: your co-author <their email>
I have a ;co
snippet for this.
References: