I'm using git for several project at the same time. Apparently I have a global setting with username, etc. What I want to maintain is different user name, email, etc for different project. How to achieve this?
            Asked
            
        
        
            Active
            
        
            Viewed 3,492 times
        
    1 Answers
14
            
            
        Just use the git config command without the --global parameter.
Instead of
git config --global user.name "lang2"
Type
git config user.name "lang2"
As described in the documentation, global configurations are stored in ~/.gitconfig, and per repository configuration resides in .git/config.
- 
                    Do you know if it is possible to add a tracked configuration as well? Such that the config will be available on each checkout? I was thinking about adding a `.gitattributes` filter to clean up files prior to comitting, and it would make sense to do this for each collaborator. – exhuma May 23 '18 at 07:46
 
     
    