I\'d like to show all configured Git sections.
I only found git config --get core.editor
, and I\'d like to output everything that\'s configured globally
The shortest,
git config -l
shows all inherited values from: system, global and local
To find all configurations, you just write this command:
git config --list
In my local i run this command .
Md Masud@DESKTOP-3HTSDV8 MINGW64 ~
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
user.email=infomasud@gmail.com
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
Since Git 2.26.0, you can use --show-scope option:
git config --list --show-scope
Example output:
system rebase.autosquash=true
system credential.helper=helper-selector
global core.editor='code.cmd' --wait -n
global merge.tool=kdiff3
local core.symlinks=false
local core.ignorecase=true
It can be combined with
--local
for project config, --global
for user config, --system
for all users' config--show-origin
to show the exact config file locationOn Linux-based systems you can view/edit a configuration file by
vi/vim/nano .git/config
Make sure you are inside the Git init folder.
If you want to work with --global config
, it's
vi/vim/nano .gitconfig
on /home/userName
This should help with editing: https://help.github.com/categories/setup/
How do I edit my global Git configuration?
Short answer: git config --edit --global
To understand Git configuration, you should know that:
Git configuration variables can be stored at three different levels. Each level overrides values at the previous level.
1. System level (applied to every user on the system and all their repositories)
git config --list --system
(may need sudo
)git config --system color.ui true
git config --edit --system
2. Global level (values specific personally to you, the user).
git config --list --global
git config --global user.name xyz
git config --edit --global
3. Repository level (specific to that single repository)
git config --list --local
git config --local core.ignorecase true
(--local
optional)git config --edit --local
(--local
optional)How do I view all settings?
git config --list
, showing system, global, and (if inside a repository) local configsgit config --list --show-origin
, also shows the origin file of each config itemHow do I read one particular configuration?
git config user.name
to get user.name
, for example.--system
, --global
, --local
to read that value at a particular level.Reference: 1.6 Getting Started - First-Time Git Setup
git config --list
is one way to go. I usually just open up .gitconfig
though.