punchcard generator for git commit frequencies
Project description
Simple git punchcard utility, inspired by git-punchcard-plot but rewritten for python3 with matplotlib.
Installation
Install or upgrade from PyPI as follows:
pip install --user --upgrade git-punchcard
Also, make sure that $HOME/.local/bin is in $PATH.
To avoid conflicts with other packages, I recommend installing into an isolated environment, e.g. using pipx:
pipx install git-punchcard
Usage
Basic usage:
git punchcard
Additional arguments can be specified as follows:
git punchcard [options] [log options] [revision range] [-- pathes]
For more help on available options, type:
git punchcard -h # [options]
git help log # [log options]
git help gitrevisions # [revision]
Options
The most common builtin options are:
# use a fixed timezone for all commits (case-sensitive):
git punchcard --timezone CET
# show punchcard with specified y/x axes:
git punchcard -p year/month
git punchcard -p wday/month
# histogram with specified x axis:
git punchcard -p /wday
# set the directory of the git repository:
git punchcard -C /path/to/repo
# show a github-like punchcard plot with grid:
git punchcard --grid
By default, each commit’s local timezone is used for the plot.
git log options
Additionally, you can pass any options understood by git log to e.g. restrict the range of commits and limit to commits performed by a certain author:
# include only commits by specific author:
git punchcard --author=myself
# consider only only the 20 commits:
git punchcard master~20..master
# commits within a certain time frame:
git punchcard --since="1 year ago" --until=now
# show at which times a certain file/folder is usually edited:
git punchcard --follow -- README.rst docs
# show at which times, people like to merge:
git punchcard --merges
Advanced example
Track evolution of commit activity over the years:
for year in {2016..2019}; do
git punchcard -o $year.png --title $year \
--since 1.1.$year --until 31.12.$year
done
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for git_punchcard-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24806b2d6e4da4ad633d1f01299de7d6f7437b5c8da5f0b8f69305f6c93a6a62 |
|
MD5 | ab1c12ae9ec1ddf0502dee785df31b02 |
|
BLAKE2b-256 | 07bb597005441dd5a59f95508c22d1875edeb8f5413ee979ccdf7452620cea92 |