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

Taught in

References