Set Commit Author with git or hg
Publikováno: 24.3.2019
Knowing who authored a code patch is a sacred and important practice in the world of software engineering. Knowing the author gives the reviewer an idea of trust level, know who to ask questions about the patch, and gives credit to the genius of an important fix. There have been times when I’ve received patches […]
The post Set Commit Author with git or hg appeared first on David Walsh Blog.
Knowing who authored a code patch is a sacred and important practice in the world of software engineering. Knowing the author gives the reviewer an idea of trust level, know who to ask questions about the patch, and gives credit to the genius of an important fix.
There have been times when I’ve received patches via email. Other times I need to translate a patch from git to mercurial (hg), so I’ve needed to know how to set a different commit author with both version control systems.
To set the commit author with git
git commit --amend --author="Someone Else <other@person.com>"
To set the commit commit author with hg:
hg commit --amend --user="Someone Else <other@person.com>"
Giving credit to an author is respectful, responsible, and important. Know that regardless of your VCS, you can set commit author name and email for another author!
The post Set Commit Author with git or hg appeared first on David Walsh Blog.