git-foresta is a text-based git log graph viewer. It is a modified version of git-forest (written in Perl by Jan Engelhardt).
Following image is a result of
git-foresta --all --style=10 | less -RSX
with font Meslo LG.
Following image is a result of
git-foresta --all --style=1 --graph-symbol-commit=★ --graph-symbol-tip=☆ --graph-margin-right=2 | less -RSX
with font Ricty Diminished.
Terminal emulator of sample screenshots: iTerm2 with Solarized Dark color scheme.
The command git-foresta
can take same options and arguments as git log
(except --pretty
or --format
).
It can take additional options below.
--help
: Show help and exit.--svdepth=<Subvine depth>
: Maximum length of merge subvines (default:2
).--no-status
: Do not show the working tree status near HEAD (show by defalt).--style=<Style>
: Select<Style>
from following.1
: Use single-line visuals (default).2
: Use double-line visuals.10
: Use specific rounded Unicode visuals for edges.15
: Use single bold-line visuals.
--graph-margin-left=<Margin>
: Left margin of the commit graph (default:2
).--graph-margin-right=<Margin>
: Right margin of the commit graph (default:1
).--graph-symbol-commit=<Symbol>
: Graph symbol of commit (default:●
).--graph-symbol-merge=<Symbol>
: Graph symbol of merge (default:◎
).--graph-symbol-overpass=<Symbol>
: Graph symbol of overpass (default:═
).--graph-symbol-root=<Symbol>
: Graph symbol of root (default:■
).--graph-symbol-tip=<Symbol>
: Graph symbol of tip (default:○
).--version
: Print the version number and exit.
All other options and arguments (except --pretty
or --format
) are passed down to git-log. (e.g. --all
)
Since git-foresta has no pager of is own, it is recommended to use some paging program
via pipe with appropriate option (e.g. git-foresta | less -RSX
).
Copy the git-foresta
file (at the root of this repository) to one of the place in your PATH
,
and give execute permission to it.
For example, if you have ~/bin
in your PATH
, you can install git-foresta by following one-liner:
curl -L https://github.com/takaaki-kasai/git-foresta/raw/master/git-foresta -o ~/bin/git-foresta && chmod +x ~/bin/git-foresta
-
Without
--no-status
option, current working tree status is shown near HEAD. Meanings of the symbols are as follows:*
: There are unstaged changes.+
: There are staged changes.%
: There are untracked files.$
: There are stashed changes.
-
Example of shell configuration for zsh:
function gifo() { git-foresta --style=10 "$@" | less -RSX } function gifa() { git-foresta --all --style=10 "$@" | less -RSX } compdef _git gifo=git-log compdef _git gifa=git-log
GPL-3.0, see LICENSE
.
Copyright (C) 2008 Jan Engelhardt
Copyright (C) 2017 Takaaki Kasai