# git-graph manual **Content** * [Overview](#overview) * [Options](#options) * [Formatting](#formatting) * [Custom branching models](#custom-branching-models) ## Overview The most basic usage is to simply call git-graph from inside a Git repository: ``` git-graph ``` This works also deeper down the directory tree, so no need to be in the repository's root folder. Alternatively, the path to the repository to visualize can be specified with option `--path`: ``` git-graph --path "path/to/repo" ``` **Branching models** The above call assumes the GitFlow branching model (the default). Different branching models can be used with the option `--model` or `-m`: ``` git-graph --model simple ``` To *permanently* set the branching model for a repository, use subcommand `model`, like ``` git-graph model simple ``` Use the subcommand without argument to view the currently set branching model of a repository: ``` git-graph model ``` To view all available branching models, use option `--list` or `-l` of the subcommand: ``` git-graph model --list ``` For **defining your own models**, see section [Custom branching models](#custom-branching-models). **Styles** Git-graph supports different styles. Besides the default `normal` (alias `thin`), supported styles are `round`, `bold`, `double` and `ascii`. Use a style with option `--style` or `-s`: ``` git-graph --style round ``` ![styles](https://user-images.githubusercontent.com/44003176/103467621-357ce780-4d51-11eb-8ff9-dd7be8b40f84.png) Style `ascii` can be used for devices and media that do not support Unicode/UTF-8 characters. **Formatting** Git-graph supports predefined as well as custom commit formatting through option `--format`. Available presets follow Git: `oneline` (the default), `short`, `medium` and `full`. For details and custom formatting, see section [Formatting](#formatting). For a complete list of all available options, see the next section [Options](#options). ## Options All options are explained in the CLI help. View it with `git-graph -h`: ``` Structured Git graphs for your branching model. https://github.com/mlange-42/git-graph EXAMPES: git-graph -> Show graph git-graph --style round -> Show graph in a different style git-graph --model -> Show graph using a certain git-graph model --list -> List available branching models git-graph model -> Show repo's current branching models git-graph model -> Permanently set model for this repo USAGE: git-graph [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: -d, --debug Additional debug output and graphics. -h, --help Prints help information -l, --local Show only local branches, no remotes. --no-color Print without colors. Missing color support should be detected automatically (e.g. when piping to a file). Overrides option '--color' --no-pager Use no pager (print everything at once without prompt). -S, --sparse Print a less compact graph: merge lines point to target lines rather than merge commits. --svg Render graph as SVG instead of text-based. -V, --version Prints version information OPTIONS: --color Specify when colors should be used. One of [auto|always|never]. Default: auto. -f, --format Commit format. One of [oneline|short|medium|full|""]. (First character can be used as abbreviation, e.g. '-f m') Default: oneline. For placeholders supported in "", consult 'git-graph --help' -n, --max-count Maximum number of commits -m, --model Branching model. Available presets are [simple|git-flow|none]. Default: git-flow. Permanently set the model for a repository with > git-graph model -p, --path Open repository from this path or above. Default '.' -s, --style