git-state - view the state of the working tree
git state [(-l|--log) count] [(-L|--no-log)] [--full-log]
[(-r|--reflog) count] [(-R|--no-reflog)] [--full-reflog]
[(-s|--status)] [(-S|--no-status)]
[(-b|--branches)] [(-B|--no-branches)]
[(-t|--stashes)] [(-T|--no-stashes)]
[(-e|--show-empty)] [(-E|--no-show-empty)]
[(-c|--color) [when]] [(-C|--no-color)]
[(-p|--pretty)] [(-f|--format) format]
[--clear] [--no-clear]
[--ignore-extensions [extension ...]]
[(-o|--order) section [section ...]]
git state (-h|--help)
git state (-v|--version)
Used to see a more concise and comprehensive view of the working directory. The output includes results from git status, git log, git branch, and git stash.
-h|--helpPrint a simple help message.
-v|--versionPrint version.
-l|--log countLimits commits in the log section. If less than 1, the section is skipped.
-L|--no-log Don't output the log section. Equivalent to -l 0 or --log 0.
--full-logOutput the entire log regardless of size.
-r|--reflog countLimits actions in the reflog section. If less than 1, the section is skipped.
-R|--no-reflog Don't output the reflog section. Equivalent to -r 0 or --reflog 0.
--full-reflogOutput the entire reflog regardless of size.
-s|--statusPrint the status section.
-S|--no-statusDon't print the status section.
-b|--branchesPrint the branches section.
-B|--no-branchesDon't print the branches section.
-t|--stashesPrint the stashes section.
-T|--no-stashesDon't print the stashes section.
-e|--show-emptyShow empty sections rather than omitting them.
-E|--no-show-emptyOmit empty sections. This does not apply to the status section.
-c|--color [when] Show colored output. when must be one of always, never, or auto. Not including when is equivalent to --color=always.
-C|--no-color Never color output. Same as --color=never.
-p|--pretty Display in pretty format. This is equivalent to -f|--format pretty.
-f|--format formatThe format used to print each section. Valid values include: compact and pretty.
--clear Clear the screen before printing.
--no-clearDo not clear the screen before printing.
--ignore-extensions [extension ...]A list of extensions to ignore when printing. If none are specified, all of them will be ignored. See EXTENSIONS section for more detail.
-o|--order section [section ...]A custom section order.
git-state.log.show boolTrue or false flag determining whether the log section should show when no other related flags are specified.
Default: true
git-state.log.count int The default log length. Can be overridden using the -l|--log count option.
Default: 10
git-state.reflog.show boolTrue or false flag determining whether the reflog section should show when no other related flags are specified.
Default: true
git-state.reflog.count int The default reflog length. Can be overridden using the -r|--reflog count option.
Default: 5
git-state.format string The default formatting for git-state. Valid options include: pretty and compact. If no value is specified or an invalid value is entered, compact is used. The options -f|--format format or -p|--pretty will override this setting.
Default: compact
git-state.status.show bool True or false flag determining whether the status section should show when no other related flags are specified. Options (-s|--status) and (-S|--no-status) override this value.
Default: true
git-state.branches.show bool True or false flag determining whether the branches section should show when no other related flags are specified. Options (-b|--branches) and (-B|--no-branches) override this value.
Default: true
git-state.branches.show-only-default bool True or false flag determining whether the branches section should show when only the default branch is present. The default branch is determined using the git-state.branches.default configuration.
Default: true
git-state.branches.default stringThe default branch for determining if the branches section should be shown.
Default: master
git-state.stashes.show bool True or false flag determining whether the stashes section should show when no other related flags are specified. Options (-t|--stashes) and (-T|--no-stashes) override this value.
Default: true
git-state.show-empty bool True or false flag determining whether empty sections should be shown. Options (-e|--show-empty) and (-E|--no-show-empty) override this value.
Default: false
git-state.clear bool True or false flag determining whether to clear the screen before printing. Options --clear and --no-clear override this value.
Default: true
color.ui string Determines whether or not colors are printed in the output. Options --color [when] and --no-color override this value.
Default: auto
git-state.extensions.* stringA custom command to execute and print as its own section. See EXTENSIONS section for more detail.
git-state.extensions.*.name stringA custom name for an extension. If not specified, the extension key is used. See EXTENSIONS section for more detail.
git-state.order string Custom order in which to print sections. Multiple section names are separated by a pipe (|) character. Any remaining sections not included are printed in the order they are handled internally. Option -o|--order overrides this value.
Custom sections can be created by setting a config in the following format:
git-state.extensions.<section-name>
The extension can be any valid script or command but must accept the flag --color=when. when will only be one of: never or always. Unlike git state itself, when won't ever be omitted. The section name for an extension defaults to the key name but can be overridden by defining git-state.extensions.<section-name>.name.
$ git config git-state.extenstions.graph "git log --oneline --graph --all --decorate -n 10"
$ git state -LRTB # ignore most sections for brevity
# status (state-extensions)
M bin/commands/state.py
M man/man1/git-state.ronn
# graph
* b27b2e5 (master) Merge branch 'fix-blank-lines'
|\
| * c40b5cf Fix upstream printing blank line
| * 918d4f7 Fix settings printing blank line
|/
* 89736f9 Merge branch 'fix-documentation'
|\
| * 0e7cc6e Add see also section
| * 059ff8b Fix settings documentation formatting
| * 4d66f32 Fix changes documentation
|/
| * 48ab35e (HEAD, state-extensions) Fix status title
| * bc45540 Refactor how arguments are passed into subcommands
| * a0ea096 Refactor parameters
$
An extension can be ignored by listing it in --ignore-extensions [extension ...].
git-status(1), git-log(1), git-reflog(1), git-branch(1), git-stash(1)