git-foresta in go, with more colors
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-12 15:52:14 -04:00
go.mod chore: update deps + switch to oigiki.ProcessTagsFast 2026-08-12 14:28:41 -04:00
go.sum chore: update deps + switch to oigiki.ProcessTagsFast 2026-08-12 14:28:41 -04:00
LICENSE reformat license 2026-01-07 13:59:04 -05:00
README.MD doc 2026-08-12 15:51:46 -04:00
rivera.go ver inc 2026-08-12 15:52:14 -04:00
showoff.png update readme 2026-08-11 14:15:08 -04:00
showoff2.png add second showff pic + doc 2026-08-12 13:47:50 -04:00
util.go strip out color regexes for basic substring func 2026-08-12 13:29:58 -04:00
vis.go test cleanup 2026-08-12 14:07:12 -04:00

git-rivera/git-河流

git-foresta in go

screenshot of git-rivera output, printing esp-miner with the options '--all --start 86523a69b --end 893668fba --style 6' screenshot of git-rivera output, printing cli-pride-flags with the option '--end 4d4e1ff'

features/differences from git-foresta

  • the graph is reversed by default, with the root at the top and tip(s) at the bottom
  • branches are colored down the entire length instead of only at commits
  • --repository option to pass a path (no more needing to cd beforepaw)
  • --start and --end to display a section of the graph
  • branch overpass smoothing is configurable with --smooth-overpass ex: overpass becomes ══════ instead of ═╪═╪═╪
  • accepts and passes on git args (git-rivera --rivera-arg -- --git-arg, --git-arg-2)

install

git-rivera depends on git

go install git.0xf0xx0.eth.limo/0xf0xx0/git-rivera@latest

from source

git clone https://git.0xf0xx0.eth.limo/0xf0xx0/git-rivera.git
cd rivera
go build
go install

usage

with git:

git rivera

or use it standalone:

git-rivera

options

	--repository path, --repo path          repository path to use (default: ".")
	--start commithash                      commithash to start at
	--end commithash                        commithash to end at
	--hashlength len, --hashlen len, -l len length of the commit hash (min: 4) (default: 0)
	--messagelength len, --msglen len       length of the commit message (default: 50)
	--style num, -s num                     style num to select (0-7) (default: 1)
	--userstyle chars                       graph chars to use (format: ABDO.efg.IKm.xyz.tCMr)
	--subvinedepth uint, --svdepth uint     internal lookahead depth for branches, slightly modifies graph | seems like 1-10 is the range, anything further increases processing time for no visual difference (default: 2)
	--graphmarginleft uint, --marginl uint  left margin of the commit graph (default: 2)
	--graphmarginright uint, --marginr uint right margin of the commit graph (default: 1)
	--all, -a                               display all branches
	--smooth-overpass                       smooth out overpasses, ex: '═╪═╪═╪' -> '══════'
	--reverse, -r                           reverse the flow
	--status                                display the git status
	--branchcolors color,color[,color]      comma separated color,color[,color] used for branches, passed straight to oigiki (default: "red, blue, yellow, green, cyan, magenta, white")
	--maxgitrecursedepth uint, --mgrd uint  maximum depth to search for a .git dir (default: 8)
	--help, -h                              show help
	--version, -v                           print the version
	--color                                 force color output
	--nocolor, --stdout                     disable color output

--userstyle usage

git-rivera --userstyle "├┤──.┌┬┐.│┼─.└┴┘.↓□▣■"

use --style 0 to see the raw graph for reference

--userstyle graph chars

  • A: branch to right
  • B: branch to left
  • C: commit
  • M: merge commit
  • D: overpass over empty space
  • e: merge visual left (╔)
  • f: merge visual center (╦)
  • g: merge visual right (╗)
  • I: straight line (║)
  • K: branch visual split (╬)
  • m: single line (─)
  • O: overpass (≡)
  • r: root (╙)
  • t: tip (╓)
  • x: branch visual left (╚)
  • y: branch visual center (╩)
  • z: branch visual right (╝)
  • .: separator

todo

  • finish compat