Three levels of GIT config

There are 3 levels of git config; project, global and system.

  • project: Project configs are only available for the current project and stored in .git/config in the project’s directory.
  • global: Global configs are available for all projects for the current user and stored in ~/.gitconfig.
  • system: System configs are available for all the users/projects and stored in /etc/gitconfig.

Create a project specific config, you have to execute this under the project’s directory.

Create a global config

Create a system config

And as you may guess, project overrides global and global overrides system.

Read Also:  Loops in Java

Leave a Reply

Your email address will not be published. Required fields are marked *