Lesson 3 / 28
Configuring Your Identity
Set your name and email with git config so every commit carries the right identity.
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
- Uploads the setting to GitHub
- Applies the setting to every repo on the machine
- Deletes the repository
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.