LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-var

Display Git logical variables

TLDR

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

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
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

SEE ALSO

RESOURCES

Copied to clipboard
Kai