git-follow
follows lifetime changes of a pathspec in Git, providing a simplified log and diff.
You can install git-follow
via Homebrew or manually.
brew tap nickolasburr/pfa brew install git-follow
git clone https://github.com/nickolasburr/git-follow.git
cd git-follow
make
make install
By default, files are installed to /usr/local
. You can install elsewhere by passing PREFIX
to make install
.
make install PREFIX="$HOME/.usr/local"
git-config(1) settings can be used to customize the behavior of git-follow.
Configuration Description Settings Default follow.diff.mode Diff mode to use with git-diff(1), git-log(1), git-show(1), etc.See --word-diff of git-log(1).inline
sxs
colorsxs
inline
follow.log.format Log format to use with git-log(1).See --format of git-log(1) for syntax. - -follow.pager.disable Disable pager used with git-diff(1), git-log(1), git-show(1), etc.See --no-pager of git(1).true
false
false
Options can be specified to provide more refined information. If no options are given, all applicable commits will be shown.
-b, --branch BRANCHShow commits for BRANCH-f, --firstShow first commit where Git initiated tracking of pathspec.-l, --last COUNTShow last COUNT commits for pathspec.Omit COUNT defaults to last commit.-L, --lines X[,Y]Show commits for lines X through Y.Omit Y defaults to EOF.-p, --pagerForce pager when invoking git-log(1).Overrides follow.pager.disable config value.-P, --pickaxe STRINGShow commits which change the frequency of STRING in revision history.See -S of git-log(1).-r, --range X[,Y]Show commits in range X through Y.Omit Y defaults to HEAD.-t, --tag TAGShow commits specific to tag TAG.-T, --totalShow total number of commits for pathspec.-h, --help, --usageShow usage information.-V, --versionShow current version number.
Like standard Git builtins, git-follow
supports an optional pathspec delimiter --
to help disambiguate options, option arguments, and refs from pathspecs.
Display commits on branch topic which affected blame.c
git follow --branch topic -- blame.c
Display first commit where Git initiated tracking of branch.c
git follow --first -- branch.c
Display last 5 commits which affected column.c
git follow --last 5 -- column.c
Display last commit where lines 5-<EOF> were affected in diff.c
git follow --last --lines 5 -- diff.c
Display last 3 commits where lines 10-15 were affected in bisect.c
git follow --last 3 --lines 10,15 -- bisect.c
Display commits where function funcname was affected in archive.c
git follow --func funcname -- archive.c
Display commits in range from aa03428 to b354ef9 which affected worktree.c
git follow --range aa03428,b354ef9 -- worktree.c
Display commits in range from tag v1.5.3 to tag v1.5.4 which affected apply.c
git follow --range v1.5.3,v1.5.4 -- apply.c
Display commits up to tag v1.5.3 which affected graph.c
git follow --tag v1.5.3 -- graph.c
Display total number of commits which affected rebase.c
git follow --total -- rebase.c