No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 291 commits behind esc:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Program Description

When run from within a git working tree, this python script generates
a directed acyclic graph (DAG) of the hierarchy of all tags and
branches present in the git repository.

It uses an easy-to-write Graphviz syntax to output the graph data for
the repository. The output will then be processes by the Graphviz
`dot' utility to convert it to a picture in various formats, e.g. SVG
or PNG.


You just need a working Python installation on your machine. If you
want to convert the output to an actual image, you'll also have to
install the `graphviz' tool. (To check whether this tool is installed,
perform a call to `dot -V' and check if there's something about the
Graphviz version.)


Generate SVG graph of ~/git-repo/.git and view the result in firefox:

    $ ./git-big-picture -f svg -v firefox ~/git-repo/.git

(Please note that you'll have to append '.git' to the working tree
path, because git stores its files in that directory. If you omit the
argument, the script will operate on the git repository you are
currently in.)

Generate PNG version of current git directory and save to 'our-project.png':

    $ ./git-big-picture -f png -o our-project.png

Manually pipe the Graphviz commands to the `dot' utility:

    $ ./git-big-picture ~/git-repository/.git | dot -Tpng -o graph.png

(Without options, the script has a simple plaintext output mode which
is understood by `dot'. For further information see `man dot')

If you specify a custom format, but neither a viewer nor an output
file, the script will output the image to stdout. That is to enable
you to use it in shell scripts and pipe the result (for example a
gzipped SVG version) to another program.

Git Integration

You can easily integrate this script as a regular git command. Simply
copy the script to one of the directories listed in your $PATH
(ideally, to $HOME/bin). Then you can use `git big-picture' from any
git directory:

    $ git big-picture -f pdf -v xpdf -o visualization.pdf

This will present you with a PDF viewer displaying your project's
graph, and stores this PDF in a file called `visualization.pdf'.