Checking

Git list is used to check your git config, for example your default branch name, your credentials, which SSH/GPG key is used etc.

Usage:

git config --list

Output:

gpg.format=ssh
user.signingkey=/nfs/homes/username/.ssh/id_rsa.pub
user.name=John Doe
user.email=mail@gmail.com
init.defaultbranch=master
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
...
(END)

p.s you can also preview specific key’s value by typing:

git config value
# e.g git config user.name

Configuring

Each option of the config is changed in a similar way; For example, in order to change the name of the default branch from master to main:

git config --global init.defaultbranch main