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).
Written by Demian Brecht
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#