Repository navigation
v0.1.1
Install
Put git-view-diff on your PATH, and Git picks it up as the git view-diff subcommand.
# aarch64-apple-darwin | x86_64-apple-darwin | x86_64-unknown-linux-gnu | aarch64-unknown-linux-gnu
TARGET=aarch64-apple-darwin
mkdir -p ~/.local/bin # make sure it is on your PATH
curl -fsSL https://github.com/Wxh16144/git-view-diff/releases/download/v0.1.1/git-view-diff-$TARGET.tar.gz | tar xz -C ~/.local/bin
git view-diff -VWindows: extract git-view-diff.exe from git-view-diff-x86_64-pc-windows-msvc.zip into a directory on your PATH.
Note
On macOS, a binary downloaded via a browser is quarantined by Gatekeeper and gets killed (died of signal 9) or moved to Trash on first run. Use the curl command above, or clear the flag before running it:
xattr -d com.apple.quarantine ~/.local/bin/git-view-diff
Usage
git view-diff # working tree changes -> patch-view.html
git view-diff --cached # any `git diff` args are passed through
git view-diff main...HEAD -- src
git view-diff -o review.html --open # custom output file, then open in browser
git show HEAD | git view-diff # read a diff/patch from stdin
git view-diff -h