gitdraw

A simple tool for generating git graphs


Keywords
git, graph, draw, svg
License
MIT
Install
pip install gitdraw==1.0.6

Documentation

Gitdraw

A simple tool for generating git graphs from a set of git commands

Getting Started

Installing

Either clone directly from the repo or install using pip

pip install gitdraw

Running the tests

The project tests are run with pytest automatically in pipelines. To run them manually find the pytest script command in .gitlab-ci.yml and run it from the root of the repository.

pytest:
  stage: Test
  script:
  - <this command>

Running the tool

The tool is run using python3.7. For help text use:

python3.7 -m gitdraw.__main__ -h

It takes a single input file containing a list of git commands and outputs a SVG representation

python3.7 -m gitdraw.__main__ -i infile

The tool currently supports the following commands:

  • git checkout <branch>
  • git commit
  • git branch <branch>
  • git merge <branch>

Built With

See requirements.txt for the full details of external packages. A number are used just for testing so won't be required if you don't intend to run the tests

Examples

There are a number of autogenerated examples that can be viewed here along with their source text.