Git Configuration Levels
There are three configuration levels in gits.
-
1. System:
- Command :
git config -system - Saves to
/etc/gitconfig, applies to all users.
- Command :
-
2. Global:
- Command :
git config -global - Saves to
~/.gitconfig, applies to the current user.
- Command :
-
3. Local:
- Command :
git config -local - Saves to
.git/configin the repository.
- Command :
User Setup Steps
Users must configure name and email for commits.
- Set user name.
- Set user email.

# locally : only for the current repo
git config user.name "Your Name"
git config user.email "you@example.com"
# globally : applies to all repositories on system
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Key Note
- Local overrides global, global overrides system level.
- For information releated to configuration :
git config --list