How to Set Commit Author
I've worn dozens of hats on a dozen different teams during my time at Mozilla, but none has been as rewarding and challenging as community management. Whether it's mentoring students, welcoming new contributors, or reviewing pull requests, there's always so much to be done. There's also the rare occasion where I need to submit a patch for a contributor.
Since I work with both git and mercurial (hg), I've needed to learn how to set commit author in each version control system.
To set the commit author with git, you would execute:
git commit --author="User Name <username@domain.com>" -m "The commit message"
To set the commit author with mercurial, you would execute:
hg commit -u "User Name <username@domain.com>" -m "The commit message"
Giving community members credit for their patches is the ultimate sign of respect, so in the case you need to translate those patches for a contributor, these snippets are gold. Help them help you!