Skip to content

Instantly share code, notes, and snippets.

@nashid
Forked from lifuzu/.gitconfig
Last active February 22, 2021 08:18
Show Gist options
  • Save nashid/da5dacb75a8043bc85233a7843bd2a24 to your computer and use it in GitHub Desktop.
Save nashid/da5dacb75a8043bc85233a7843bd2a24 to your computer and use it in GitHub Desktop.
Three levels of GIT config
# There are 3 levels of git config: global, project, and system.
# global: Global configs are available for all projects for the current user and stored in ~/.gitconfig.
# project: Project configs are only available for the current project and stored in .git/config in the project's directory.
# system: System configs are available for all the users/projects and stored in /etc/gitconfig.
# Create a global config
$ git config --global user.name "John Doe"
# Create a project specific config, you have to execute this under the project's directory.
$ git config user.name "John Doe"
# Create a system config
$ git config --system user.name "John Doe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment