Details
Configure Different Credentials for Git
If you have git already installed globally on your machine
and you want to work on a project with different credentials
for example your work redentials. Do this
At the root of the repository, enter the following commands
git config --local user.name "Your Work Name"
git config --local user.email "your_work_email@example.com"
This will change the git credentials only for the specified project.
Use the --global
flag to change the credentials for all repos.
To view the git credentials for a repo, type
git config user.name
git config user.email
Or git config --list
to view all