Set git email address on a per repository basis
git allows you to specify email addresses on a per repository basis. This is handy when working with repositories from multiple organisations.
When in the repo directory, use the following commands to set a per repository email address:
jbloggs@hostname:~/git$ git config user.name “Joe Bloggs” jbloggs@hostname:~/git$ git config user.email “jbloggs@alternativedomain.com”
Alternatively, you can edit .git/config manually, and add the required information under the [user] heading:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git@example.com:example.git [branch "master"] remote = origin merge = refs/heads/master [user] name = Joe Bloggs email = jbloggs@alternativedomain.com