An out-of-the-box pretty git log --graph.
- Lightweight: Only depends on standard Unix tools.
- Smart defaults: Colorful, readable graph — no configuration needed.
- Flexible: Use (almost) any
git logoption. - Autocompletion: Uses
git logcompletions.
- Git
- Awk
- Cat
- tput
- Clone the repository into your oh-my-zsh custom plugins directory:
git clone "https://github.com/Maks0u/git-graph.git" "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/git-graph"- Add
git-graphto your list of plugins in your.zshrcfile:
plugins=(... git-graph ...)curl --location https://raw.githubusercontent.com/Maks0u/git-graph/refs/heads/main/git-graph.sh --output /usr/local/bin/git-graph
chmod +x /usr/local/bin/git-graphYou'll have to manually define aliases:
alias gg='git-graph'
alias gga='git-graph --all'
alias ggs='git-graph --all --max-count=20 | cat'| Alias | Description |
|---|---|
| gg | Show a graph of the current branch. |
| gga | Show a graph of all branches. |
| ggs | Print the last 20 commits across all branches. |
| ggb | Visualize last common commit of diverging branches using git merge-base |
gga --max-count=100 | catggb develop HEADgga --since='1 month' --date-ordergga -S 'secret'- Add customization capabilities (width, columns, etc.)
- Git Graph extension for Visual Studio Code
- Pretty Git branch graphs (stack overflow)

