Skip to main content

A git graph tool

Project description

git-graphz

Tool to create a graph from a git history showing tags, branches, stash nodes, cherry-picks.

Full documentation available online

Requirements

  • Python3
  • Graphiz (only to convert DOT format to an image)

Create a graph

Run the following inside a git directory to write a graph description (DOT format) to stdout.

git-graphz

On linux you can use the following command to create a graph.ps file

git-graphz | dot -Tps -o graph.ps

Or you can simply (the file extension must be an accepted command line option of the dot utility (see here)

git-graphz -o image.pdf

In addition to the graphviz accepted extensions, it is also possible to generate an html page

git-graphz -o image.html

Example with range

git-graphz -r a51eced..HEAD | dot -Tps -o graph.ps

Example with upstream commits

git-graphz --option=--remotes=upstream

You can also provide an url for the git repository (instead of running the command in a git directory)

git-graphz -p https://github.com/SebastienRietteMTO/git-graphz.git

Parameters

  • -v: to print info (or debug if provided twice) output to stderr
  • -m: show commit messages in nodes
  • -r range: to get a specific range of the repository. See here
  • -p path: to specify the directory containig the git repository (current working directory if omitted) or the url of a git repository
  • --option=OPTION: to add an option to the git log command used to list the relevant commits. If no option is provided the '--all' option is used. Ex: --option=--remotes=upstream

Example Graphs

simple example

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitgraphz-1.1.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file gitgraphz-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitgraphz-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gitgraphz-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db2c35a458e5702db89361ef45e4d30db8756b1de3564a4f2f7cd89ed50b6168
MD5 a83b9634db878722e3ae4c2bc7ac4a46
BLAKE2b-256 3d6860d237f0a4318602fc7f64b9a496a931b481c4f8846a6f26e989a5ba8024

See more details on using hashes here.

Supported by

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