Thursday, 15 December 2016

Configure the Project Specific Git Author/User Credential

If you working for two projects (may be one for work specific and another personal project) and you would like to configure the Git Author/User credential different for both, I mean as a project specific rather than as a global one.

You may have configured or can set as global credential as:
# To check the git configuration
git config -l

# To set the global git configuration
git config --global "RC"
git config --global ""
Now to change the credential for a project. First go the the project branch and check what's the credential it has and override with new credential using below command
# Go to the project folder first and make sure you already have git initiated.
cd ~/apps/project_folder

# To check the git configuration
git config -l

# To overwrite the name
git config "RC Pro"

# To overwrite the email
git config ""

Then, you all set for that.

Check Git for more