How to Configure Git Settings (git config)

git config reads and writes configuration values that control how Git behaves, such as your identity and command aliases.

Published September 29, 2026

git config reads and writes configuration values that control how Git behaves, such as your identity and command aliases.

Key points

  • git config --global user.name "Your Name" and user.email set the identity attached to your commits
  • --global applies to every repository for your user; without it, settings apply only to the current repository
  • git config --global alias.co checkout lets you define shortcuts for frequently used commands

Example

git config --global user.email "you@example.com"
More Git articles