LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-guilt

Track authorship changes between commits

TLDR

Show blame for currently unstaged changes
$ git guilt
copy
Show blame delta between two commits
$ git guilt [HEAD~3] [HEAD]
copy
Blame delta from origin/main to HEAD
$ git guilt [origin/main]
copy
Show emails instead of author names
$ git guilt -e [HEAD~3] [HEAD]
copy
Blame delta over the last three weeks
$ git guilt @{3.weeks.ago}
copy

SYNOPSIS

git guilt [options]git guilt [options] since [until]

DESCRIPTION

git guilt shows the delta in blame between two commits, calculating which authors gained or lost lines of code between the specified revisions. The output shows net line changes per author as a bar of pluses or minuses, with positive lengths indicating a net gain in attributed lines and negative indicating a net loss. Run with no arguments, it shows the blame count for currently unstaged modified files instead of comparing two revisions.Part of the git-extras suite, this tool reveals who is actively modifying which areas of the codebase, useful for understanding recent code ownership changes.

PARAMETERS

SINCE

Starting commit.
UNTIL
Ending commit (default: HEAD).
-e, --email
Display author emails instead of names.
-w, --ignore-whitespace
Ignore whitespace-only changes when attributing blame.
-d, --debug
Output debug information.
-h
Display usage information.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Part of git-extras package. Blame-based analysis can be slow on large histories. Measures lines, not complexity. Does not support limiting to a specific path.

HISTORY

git guilt is part of git-extras, providing blame-based change tracking named for the act of assigning "guilt" for code; the technique was originally popularized by Tim Pettersen at Atlassian.

SEE ALSO

RESOURCES

Copied to clipboard
Kai