Last Updated: February 25, 2016
·
318
· demianbrecht

Git: Project-specific user

Sometimes you have an environment in which you work on both personal and professional projects. If both are using Git, sometimes it's also nice to be able to override the --global settings. To do so, edit your project's .git/config and add the following lines:

[user]
name=[name]
email=[email]

If you've already made commits and wish to change the author of all previous commits, you can run this script: https://help.github.com/articles/changing-author-info (do note that stomping revision history is generally considered bad practice unless it's a private repo that nobody else is working on).