Skip to main content

Pretty-print `git` repository collaborators sorted by contributions

Project description

Pretty-print git repository collaborators sorted by contributions.

PyPI-Status PyPI-Versions

Build-Status Coverage-Status Branch-Coverage-Status Codacy-Grade Libraries-Rank

DOI-URI LICENCE OpenHub-Status Gift-Casper

~$ git fame
Blame: 100%|███████████████████████████████████| 11/11 [00:00<00:00, 208.43it/s]
Total commits: 302
Total files: 37
Total loc: 3134
| Author               |  loc | coms | fils |  distribution  |
| Casper da Costa-Luis | 3123 |  297 |   35 | 99.6/98.3/85.4 |
| Not Committed Yet    |    7 |    4 |    2 |  0.2/ 1.3/ 4.9 |
| Evïan Etàcidñys      |    4 |    1 |    1 |  0.1/ 0.3/ 2.4 |

The distribution column is a percentage breakdown of the other columns (e.g. in the table above, Casper has written surviving code in 35/37 = 85.4% of all files)


Latest PyPI stable release

PyPI-Status PyPI-Downloads Libraries-Dependents

pip install git-fame

Latest development release on GitHub

GitHub-Status GitHub-Stars GitHub-Commits GitHub-Forks GitHub-Updated

Pull and install in the current directory:

pip install -e git+

Register alias with git

This is probably not necessary on UNIX systems.

git config --global alias.fame "!python -m gitfame"

Tab completion

Optionally, systems with bash-completion can install tab completion support. The git-fame_completion.bash file needs to be copied to an appropriate folder.

On Ubuntu, the procedure would be:

$ # Ensure completion works for `git` itself
$ sudo apt-get install bash-completion

$ # Install `git fame` completions
$ sudo wget \ \
    -O /etc/bash_completion.d/git-fame_completion.bash

followed by a terminal restart.


The list of all changes is available either on GitHub’s Releases: GitHub-Status or on crawlers such as


git fame              # If alias registered with git (see above)
git-fame              # Alternative execution as python console script
python -m gitfame     # Alternative execution as python module
git-fame -h           # Print help

For example, to print statistics regarding all source files in a C++/CUDA repository (*.c/h/t(pp), *.cu(h)), carefully handling whitespace and line copies:

git fame --incl '\.[cht][puh]{0,2}$' -twMC

It is also possible to run from within a python shell or script.

>>> import gitfame
>>> gitfame.main(['--sort=commits', '-wt', '/path/to/my/repo'])


PyPI-Versions README-Hits

  gitfame [--help | options] [<gitdir>]

  <gitdir>       Git directory [default: ./].

  -h, --help     Print this help and exit.
  -v, --version  Print module version and exit.
  --branch=<b>    Branch or tag [default: HEAD] up to which to check.
  --sort=<key>    [default: loc]|commits|files.
  --excl=<f>      Excluded files (default: None).
                  In no-regex mode, may be a comma-separated list.
                  Escape (\,) for a literal comma (may require \\, in shell).
  --incl=<f>      Included files [default: .*]. See `--excl` for format.
  --since=<date>  Date from which to check. Can be absoulte (eg: 1970-01-31)
                  or relative to now (eg: 3.weeks).
  -n, --no-regex  Assume <f> are comma-separated exact matches
                  rather than regular expressions [default: False].
                  NB: if regex is enabled `,` is equivalent to `|`.
  -s, --silent-progress    Suppress `tqdm` [default: False].
  -t, --bytype             Show stats per file extension [default: False].
  -w, --ignore-whitespace  Ignore whitespace when comparing the parent's
                           version and the child's to find where the lines
                           came from [default: False].
  -M              Detect intra-file line moves and copies [default: False].
  -C              Detect inter-file line moves and copies [default: False].
  --manpath=<path>         Directory in which to install git-fame man pages.


GitHub-Commits GitHub-Issues GitHub-PRs OpenHub-Status

All source code is hosted on GitHub. Contributions are welcome.


Open Source (OSI approved): LICENCE

Citation information: DOI-URI



We are grateful for all GitHub-Contributions.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
git_fame-1.7.0-py2.py3-none-any.whl (15.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3
git-fame-1.7.0.tar.gz (19.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page