Skip to main content

Convert git logs to JSON for easier analysis.

Project description

Convert git logs to JSON for easier analysis.


The easiest way to install git2json is through pip:

pip install git2json

If you want the most up-to-date version (at a greater risk of encountering bugs) you can clone this repository and install it manually:

git clone
cd git2json
python install


usage: git2json [-h] [--git-dir GIT_DIR]

optional arguments:
  -h, --help         show this help message and exit
  --git-dir GIT_DIR  Path to the .git/ directory of the repository you are

The resulting JSON log is printed to standard output.

Example JSON

The following shows the structure of the JSON emitted by the tool.

    "committer": {
        "date": 1379903278,
        "timezone": "-0400",
        "name": "Tavish Armstrong",
        "email": ""
    "parents": ["e307663594031738c932877c8589552d5aafc953"],
    "author": {
        "date": 1379903278,
        "timezone": "-0400",
        "name": "Tavish Armstrong",
        "email": ""
    "tree": "bd03127651335e3a51241f507f3bf194d8336485",
    "commit": "d06454c160218b4a782afad2429abda1add54df0",
    "message": "Allow user to specify git-dir on the command line.",
    "changes": [
        [23, 3, "git2json/"]
    // ... More commits


0.1.0 (2013-09-23)

  • First release on PyPI.

0.1.1 (2013-09-25)

  • Fixed broken PyPI package.

0.2.0 (2013-09-28)

  • Parents now an array instead of a single value.

Project details

Download files

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

Source Distribution

git2json-0.2.0.tar.gz (6.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page