This git plugin allows you to create "profiles" with a name/email and easily switch between profiles. It also has a concept of "organization profiles" which contain several names and a base email, allowing you to include any number of authors on a commit. (Useful for pairing!)
Configuration is easy and lives in the gitconfig
of your choice.
gem install git-authors
Let's create two profiles in our ~/.gitconfig
:
[git-authors "personal"]
name = Bill Murray
email = [email protected]
[git-authors "example"]
name = Bill Murray
email = [email protected]
Now we can switch between the profiles easily:
$ git authors personal
Bill Murray (set in ~/.gitconfig)
[email protected] (set in ~/.gitconfig)
$ git authors example
Bill Murray (set in ~/.gitconfig)
[email protected] (set in ~/.gitconfig)