Skip to main content

git-heatmap

Shows a heatmap for your Git repositories.

Screenshot

Install

$ pip install git-heatmap

Usage

Usage: git-heatmap [OPTIONS]

Options:
  -r, --repo TEXT       Path to git repository (can be relative)
  -a, --author TEXT     Author email (default all authors)
  -b, --branch TEXT     Branch (default all branches)
  -s, --start TEXT      Start date (YYYY-MM-DD, defaults to current year
                        start)
  -e, --end TEXT        End date (YYYY-MM-DD, defaults to current year end)
  -c, --character TEXT  Character to use for heatmap (defaults to ▧)
  -sh, --shade TEXT     Color to use for heatmap (defaults to 0;255;0)
  --help                Show this message and exit.

Examples

Run git-heatmap ...

# in a directory that's already a git repository
$ git-heatmap

# on a repository elsewhere
$ git-heatmap -r /path/to/repo

# on multiple repositories!
$ git-heatmap -r /path/to/repo -r /path/to/other

# limit by author email
$ git-heatmap -a me@myself.com

# limit by multiple authors email
$ git-heatmap -a me@myself.com -a him@himself.com

# pick a specific branch
$ git-heatmap -b main

# pick multiple branches
$ git-heatmap -b main -b develop

# start from date
$ git-heatmap -s 2023-02-01

# end on date
$ git-heatmap -e 2023-02-28

How about some character and color change as well?

Screenshot

You can do this via:

# change characters
$ git-heatmap -c '⊚'

# change colors
$ git-heatmap -sh "255;255;0"

FAQ

Why?

Mostly fun, I like things cli. It's also rather annoying that github's heatmap only targets the primary branch of a repository.

Does this count any contribution other than commits?

No, this is purely commits, including merge commits (I think! :-))

What branch does it pick if I didn't specify one?

All branches!

But commits are the same in more than one branch!

Yes, that's why it only counts unique commit hashes.

The months labels aren't in line with the github heatmap

Github got it wrong, check any month's start date and notice how they push the label one column further. If you still feel they got it right, create an issue and show a screenshot, I'll fix it.

This will be slow on large repositories!

No, this internally uses git-rev-list.

Why not make this a git extension?

That was the original plan, but we are where we are...

Can I...

Yes you can. Remember this is meant as tiny fun project.

Metadata

Release files for git-heatmap 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-heatmap 0.0.6
File Size Uploaded
git-heatmap-0.0.6.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-heatmap 0.0.6
File Interpreter ABI Platform
git_heatmap-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / git-heatmap-0.0.6.tar.gz

Download URL git-heatmap-0.0.6.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4f606e9380a43d9b5f31bbb0e32ecd133686dcce409a845b16017ce8742c604e
BLAKE2b-256 checksum
How to use checksums
8af9abb5b3222905005a2b4a5f46d4975114d66951ca63ac88ee5fb0f3dd9db9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / git_heatmap-0.0.6-py3-none-any.whl

Download URL git_heatmap-0.0.6-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5745228d1d534bd9560f4682312d4df9da232e9201b3a956e264691e5b711ef9
BLAKE2b-256 checksum
How to use checksums
435e7a5d986363ebb1df1d6355a94ba013798e5624dc31866d6a746da01808ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page