Skip to content

GitHub Configurations

Published: at 08:50 AM

3 levels of git config

They are: local, global, and system. :)

The 3 levels scope the configurations. The local settings take precedence over global, and global over system.

Note: The below commands work on all platforms.

Local Config

Applies only to a specific repository. Stored in .git/config inside the repository directory.

To view (you must execute this from inside the repository directory):

git config --local --list

To edit:

git config --local --edit

Global Config

Applies to all repositories for a single user. Stored in ~/.gitconfig or ~/.config/git/config

To view:

git config --global --list

Output: git global config output

To edit:

git config --global --edit

System Config

Applies to all users on the system. Stored in /etc/gitconfig (Linux/macOS) or C:/Program Files/Git/etc/.gitconfig (Windows).

While you’re there, if you’ve still got this file, remove it: C:\Users<username>.git-credentials

To view:

git config --system --list

Output: git system config output

git config --system --edit

Next Post
Reset GitHub Credentials