Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A ruby script that generates a 'dot' file (Git DAG tree) for a given Git repository.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 sample_repo
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Rakefile
Octocat-spinner-32 git-dag.gemspec


git-dag is a ruby script that generates a DAG tree (in the 'dot' format) for a given Git repository.


You need to have Ruby installed. Try RVM or rbenv if you don't have one installed.

You need to have Graphviz installed if you want to render the DAG visually. You can install it using the package manager provided by your OS.

For instance, if you use Mac OS X and have homebrew installed, you can do:

$ brew install graphviz


Easy install with RubyGems:

$ gem install git-dag


To generate a DAG (in the format 'dot') for a Git repository, do

$ git-dag <path_to_git_repo> >

Use to 'dot' to draw the DAG:

$ dot -Tsvg -o history.svg

You can pipe the 2 commands together:

$ git-dag <path_to_git_repo> | dot -Tsvg -o history.svg

Note that if it take a good amount of time if your repository has a long history of commits.

Now you can open up 'history.svg' in your browser to see the DAG.

Graphviz supports a lot of other formats, such as jpg, pdf, png, ps2 etc. Please see Graphviz for more info.

Something went wrong with that request. Please try again.