Git - change all global settings

I have two repositories with which I want to have various information related to it.

For example, one repo is called site, and I want

user.name = admin
user.email =  admin@mysite.com

and for all other repositions I want

user.name = qwertymk
user.email = qwertymk@blah.com

Is there a way to switch profiles or something similar in git?

I am in the windows, so I use msysgit. (Feel free to give only a linux/macsolution for others)

EDIT:

Now I understand that I can write a batch script package for sharing c:\users\<me>\.gitconfig, but this is more like a hack.

+3
source share
1 answer

Git has global settings and settings for each repository.

Using:

$ git config --global user.name "qwertymk"
$ git config --global user.email "qwertymk@blah.com"

Then cd to the 'site' repository and use:

$ git config user.name "admin"
$ git config user.email "admin@mysite.com"
+12
source

All Articles