Qi is a search algorithm used to find Git revisions in structured time intervals for later analysis.
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
qi
.gitignore
LICENSE.txt
README.md
setup.cfg
setup.py

README.md

Qi slices any Git commit history into time intervals of equal length, and then tells you the last commit in each of those intervals.

This lets you run analytics at meaningful times, answering questions like "what did our code look like at the end of every week for the past 3 months?"

$ qi --every week --past "3 months"
da39a3ee5e6b4b0d3255bfef95601890afd80709 # Last commit of Friday, Jul 22, 2016
4452d71687b6bc2c9389c3349fdc17fbd73b833b # Last commit of Friday, Jul 15, 2016
a0f1490a20d0211c997b44bc357e1972deab8ae3 # Last commit of Friday, Jul 08, 2016
...

Using Qi on small or neglected projects may yield confusing output.

$ qi --every hour --past "6 months"
da39a3ee5e6b4b0d3255bfef95601890afd80709 # Last commit of an hour in Monday, Sep 07, 2015
4452d71687b6bc2c9389c3349fdc17fbd73b833b # Last commit of an hour in Monday, Jun 08, 2015

Take care not to use small time intervals in long, dense commit histories unless you want to set your processor on fire.

# Running on Linux kernel
$ qi --every hour --past "10 years"

# 8 billion lines

Setup

$ [sudo] pip install git-qi

Use of sudo is generally not encouraged, but will install the package globally if you don't have virtualenv available.

Run qi --help to confirm installation and view usage details.