the wiki of cscosine
This ensures your email/name are set per repository only, NOT globally.
note: see also Multi-Account GitHub SSH Setup (Clean and Safe) if you want to setup properly multiple accounts on the same machine
Inside the repo:
git config user.name "Your Name"
git config user.email "your.email@email.com"
git config --local --list
Or check what Git will actually use:
git var -l
git var GIT_COMMITTER_IDENT
git var GIT_AUTHOR_IDENT
Those are ok to be global
git config --global color.ui "auto"
git config --global core.editor "nano"
Remove global config:
git config --global --unset user.name
git config --global --unset user.email
Check:
git config --global --list
(System configs affect the whole machine)
sudo git config --system --unset user.name
sudo git config --system --unset user.email