# Configuring Your Identity — Git Fundamentals: Commits, Branches and Collaboration

Source: https://www.skillbyai.com/en/git/git-configuring-user

> 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.

```bash
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.

```bash
git config --list
```

Output:

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

**Quiz:** What does `git config --global` do?

- [ ] Applies the setting to only the current repo
- [ ] Uploads the setting to GitHub
- [x] 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.
