git-var

Display Git logical variables

TLDR

Show Git variables
$ git var -l
Show editor
$ git var GIT_EDITOR
Show author identity
$ git var GIT_AUTHOR_IDENT
Show committer identity
$ git var GIT_COMMITTER_IDENT
Show configured pager
$ git var GIT_PAGER

SYNOPSIS

git var [variable]

DESCRIPTION

git var shows Git logical variables such as the configured editor, pager, and author/committer identity. These values are resolved from environment variables and Git configuration, following Git's own lookup order (e.g. `$GIT_EDITOR` falls back to `core.editor`, then `$VISUAL`, then `$EDITOR`).Other recognized variables include `GITSEQUENCEEDITOR` (editor for `git rebase -i`), `GITDEFAULTBRANCH`, `GITSHELLPATH`, `GITATTRSYSTEM`/`GITATTRGLOBAL`, and `GITCONFIGSYSTEM`/`GITCONFIGGLOBAL`.The command is useful in scripts that need to query Git's resolved settings without parsing config files directly.

PARAMETERS

-l

List all variables.

INSTALL

sudo apt install git
sudo dnf install git
sudo pacman -S git
sudo apk add git
sudo zypper install git
brew install git
nix profile install nixpkgs#git

SEE ALSO

git-config(1), git-commit(1)

RESOURCES

Documentation · Source code