GITSTATS(1)

πŸ“¦ version 2016-01, in nixos 26.05, nixpkgs unstable

✨ 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 only commit_end to 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 --since to 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 πŸ’€

git(1)


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