Little Git Tricks: Change the Author of a Commit
Git tracks the author of every commit. If you do not modify anything, the global settings will be used. That is great for the day-to-day use, but it may not be what you want in all situations.
If you do pair-programming, you may want to make the commits as a team. If you commit your code on the command line, you can use this option with your commit:
git commit --author="John Doe <[email protected]>"