Lesson 3 / 26

Configuring Your Identity

Set the name and email that get attached to every commit you make.

Set name & email

--global applies this to every repo on your machine; drop it to configure just the current repo.

git config --global user.name "Ada Lovelace"
git config --global user.email "ada@example.com"

Check current config

List everything Git currently knows about your setup.

git config --list

Output:

user.name=Ada Lovelace
user.email=ada@example.com

Quick check: What does `git config --global` do?

  • Applies the setting to only the current repo
  • Applies the setting to every repo on the machine
  • Uploads the setting to GitHub
Answer

Applies the setting to every repo on the machine — Global config lives in `~/.gitconfig` and is the default for every repo unless overridden locally.