How to get git local, global, and system configuration details?

Git configurations are stored in three different places

  • System – System wide git configuration generally stored in /etc/gitconfig file, affects all git repository in the system.
  • Global – User wide git configuration generally stored in ~/.git/config file, affects all git repository of current user.
  • Local – Local git configuration generally stored in <git_repo>/.git/config file, affects current git repository only.

Get git system configuration details:

Get git global configuration details:

Get git local configuration details:

Get all git configuration details:

Get a specific git configuration:

Leave a Reply