Git: Set local user.name and user.email different for each repo

For just one repo, go into to the relevant repo DIR and:

git config user.name "Your Name Here"
git config user.email your@email.example

For (global) default email (which is configured in your ~/.gitconfig):

git config --global user.name "Your Name Here"
git config --global user.email your@email.example

You can check your Git settings with:
git config user.name && git config user.email

If you are in a specific repo which you setup a new user/config for (different to global) then it should show that local config, otherwise it will show your global config.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)