Git: how to have a project config?

I am using git for multiple projects at the same time. Apparently I have a global setting with username etc. I want to support a different username, email, etc. For different projects. How do you achieve this?

+3


source to share


1 answer


Just use the command git config

with no parameter --global

.

Instead

git config --global user.name "lang2"

      



A type

git config user.name "lang2"

      

As described in the documentation , global configurations are stored in ~/.gitconfig

, and for each configuration, the repository is in .git/config

.

+7


source







All Articles