How to Set Commit Author

By  on  

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!

Recent Features

Incredible Demos

  • By
    CSS Animations Between Media Queries

    CSS animations are right up there with sliced bread. CSS animations are efficient because they can be hardware accelerated, they require no JavaScript overhead, and they are composed of very little CSS code. Quite often we add CSS transforms to elements via CSS during...

  • By
    Sexy Album Art with MooTools or jQuery

    The way that album information displays is usually insanely boring. Music is supposed to be fun and moving, right? Luckily MooTools and jQuery allow us to communicate that creativity on the web. The XHTML A few structure DIVs and the album information. The CSS The CSS...

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!