Black Pine

Configure git username and email

Configure git username and email, globally or per folder

Manually set up the global username and email:

git config --global user.name "UserName"
git config --global user.email "user@example.com"

Configure username and email per folder:

  1. Create a .gitconfig file in each folder that needs a specific setup:

    touch .gitconfig
  2. Paste the config into .gitconfig:

    First folder Projects1:

    [user]
      email = user1@example.com
      name = UserName1

    Second folder Projects2:

    [user]
      email = user2@example.com
      name = UserName2