GITSTATS(1)
β¨ GITSTATS(1) β the git history statistics generator β¨
okay so bestie, listen up π this is the manpage for gitstats, from the User Commands family, and I'm gonna walk you through it like we're gossiping in the group chat. no cap, it's actually so useful.
πΈ NAME πΈ
gitstats β a git history statistics generator π
like, it literally reads your git repo's whole life story and turns it into stats. iconic behavior.
π¦ SYNOPSIS π¦
gitstats [options] <repository dir> <output dir>
you give it a repo dir, you give it an output dir, and it does its thing. simple as that, periodt.
β¨ DESCRIPTION β¨
gitstats is a statistics generator for git(1) repositories. fr fr β it examines the repository and produces some interesting statistics from the history of it. it's giving "data girl summer" π₯
currently, HTML is the only output format. that's the whole vibe rn, no others exist yet.
π OPTIONS π
-c option=valueβ override a default configuration value π«Ά
defaults can be seen by running gitstats without parameters. ngl, that's the move when you forget what's what.
π§ Values: π§
authors_topβ how many top authors to show. like a leaderboard but for commits πcommit_begin,commit_endβ specify a commit range to generate statistics from. you can specify onlycommit_endto limit statistics to a certain commit or another branch. lowkey so handy πlinear_linestatsβ when enabled, the lines of code statistics are collected from linear history. the downside is that commits of long feature branches appear only at the point where a merge commit is made. π if disabled (that's the old behaviour), the problem is that if two branches contain the same changes (for example, removal of same lines), the statistics get skewed. π defaults to on.max_authorsβ how many authors to show in the list of authors. keep the roster manageable β¨max_domainsβ how many domains to show in domains by commits. π¦max_ext_lengthβ maximum file extension length. the limit is the limit πprocessesβ number of concurrent processes to use when extracting git repository data. multitasking queen behavior πproject_nameβ project name to show on the generated pages. default is to use basename of the repository directory. cute and automatic πΈstart_dateβ specify a starting date to pass with--sinceto git. time travel but make it version control βstyleβ CSS stylesheet to use. serve looks, bestie π
π FAQ π
Q: how do I generate statistics of a non-master branch? π
A: use "-c commit_end=web" parameter. slay.
Q: I have files in my git repository that I would like to exclude from the statistics, how do I do that? π§
A: at the moment the only way is to use git-filter-branch(1) to create a temporary repository and generate the statistics from that. it's giving "workaround era" but it works π«Ά
Q: how do I merge author information when the same author has made commits using different names or emails? π
A: use git .mailmap feature described in MAPPING AUTHORS of git-shortlog(1). no more duplicate author drama, periodt.
π₯ EXAMPLES π₯
generates statistics from a git repository in "foo" and outputs the result in a directory "foo_stats":
gitstats foo foo_stats
as above, but only analyzes the last 10 commits:
gitstats -c commit_begin='HEAD~10' foo foo_stats
literally so easy, iykyk π
π AUTHORS π
gitstats was written by Heikki Hokkanen and others. π«
see the git repository at https://github.com/hoxu/gitstats for an up-to-date full list of contributors. go give them their flowers πΈ
π WWW π
http://gitstats.sourceforge.net/
the website. click it. β¨
π SEE ALSO π
and that's the whole page, bestie!! π this version (source 1980-01-01, dated 2016-01-08) is officially a certified classic, so go forth and generate those stats β you're gonna eat, no cap π π₯
π¦ where this page comes from
- nixos 26.05: gitstats 2016-01-08
- nixpkgs unstable: gitstats 2016-01-08
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms