Home

Awesome

git-commit-gen

git-commit-gen is a fun tool that builds a markov model (using the fantastic markovify library) of a git repo's log and use it to generate commit messages. The more commits in a repo, the more real the generated messages seem.

Example outputs:

Usage

command line:

python3 git_commit_gen.py --repo=~/my_project --author=satoshi@gmail.com --n=5

as a module:

from git_commit_gen import GitCommitGenerator

g = GitCommitGenerator('~/my_project', 'satoshi@gmail.com')
# Optional, otherwise it will build every time you call .generate()
g.build_model()
messages = g.generate(2)
for x in messages:
    print(x)