Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

This branch is 110 commits behind MarkLodato:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Makefile
README-ja.md
README.md
basic-usage.tex
checkout-after-detached.tex
checkout-b-detached.tex
checkout-branch.tex
checkout-detached.tex
checkout-files.tex
cherry-pick.tex
commit-amend.tex
commit-detached.tex
commit-maint.tex
commit-master.tex
common.tex
conventions.tex
diff.tex
index-en.html
index-ja.html
index.html
merge-ff.tex
merge.tex
publish
rebase-onto.tex
rebase.tex
reset-commit.tex
reset-files.tex
reset.tex
visual-git-guide.css
visual-git-guide.js

README.md

A Visual Git Reference

The goal of this website is to be a concise, visual reference for how git commands work. I often draw pictures like this on a whiteboard for my colleagues, so I figured I would make a nice electronic version once and for all.

Implementation

I chose to draw the images using TeX and PGF/TikZ. I originally tried using Graphviz, but unfortunately there is no way to tell it how to lay out the graph exactly. Using TikZ, I was able to create a domain-specific language to represent commit graphs, and I think the result turned out quite well.

All of the common macros are stored in common.tex. Each image source includes this file. To see an example of how to use these macros, look at commit-master.tex.

To generate the image files, I first create PDFs using pdflatex, and from there I create SVGs and PNGs using pdf2svg and convert, respectively.

License

Copyright © 2010, Mark Lodato. Japanese translation © 2010, Kazu Yamamoto. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Something went wrong with that request. Please try again.