0

I am working on two projects. And I have set the Git configuration

git config --global user.name "xxx"

When I switch project I want to change the name for the project, setting up same configuration back again.

How can I set different names for the different projects in Git?

Nevik Rehnel
  • 49,633
  • 6
  • 60
  • 50
Arpit Vaishnav
  • 4,739
  • 6
  • 39
  • 57

2 Answers2

4

Just omit the --global option to configure each repo separately. And see http://blogs.msdn.com/b/oldnewthing/archive/2013/02/27/10397393.aspx

John Zwinck
  • 239,568
  • 38
  • 324
  • 436
2

in each git project, after you git init just do

git config user.name "xxx"
AdamT
  • 6,405
  • 10
  • 49
  • 75