config scope
Which of Git's config files a setting lives in: system for every user, global for you, or local for one repository.
In more detail
The system file (usually /etc/gitconfig) applies to every user on the machine, the global file (~/.gitconfig) to you in every repository, and the local file (.git/config) to one repository. Git reads them in that order and the nearest one wins, so a local work email overrides your global personal email. Writing with no flag writes to the local file.
Example
git config --local user.name 'Ada L Byron'Related terms
- git config — The command that reads and writes Git settings, which live in plain text config files.
- --show-origin — Flags for git config that print which file, or which scope, a setting's value came from.
Taught in
- Installing Git, And Telling It Who You Are — Advanced Git Internals & Distributed Workflows