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
  • 45,305
  • 6
  • 59
  • 49
Arpit Vaishnav
  • 4,664
  • 6
  • 38
  • 55

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
  • 223,042
  • 33
  • 293
  • 407
2

in each git project, after you git init just do

git config user.name "xxx"
AdamT
  • 6,347
  • 10
  • 45
  • 74