Thursday, September 10, 2015

Use different email address for different Git repositories

Navigate to the repository directory, use the following commands to set user config for that repository
$ git config user.name "Deepak Azad"
$ git config user.email "deepak@example.com"
Alternatively, modify the config file of the repository directly and add the following lines to it
[user]
name = Deepak Azad
email = deepak@example.com