Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Octocat-spinner-32 .gitignore perform automatic detection of SVG capabilities March 06, 2010
Octocat-spinner-32 Makefile Makefile: convert tab to spaces March 02, 2014
Octocat-spinner-32 README-ja.md link try. October 14, 2010
Octocat-spinner-32 README.md Portuguese translation. February 24, 2014
Octocat-spinner-32 basic-usage-2.tex add 'git checkout HEAD' and 'git commit -a' October 02, 2011
Octocat-spinner-32 basic-usage.tex Use a scaling factor for all sizes May 15, 2010
Octocat-spinner-32 checkout-after-detached.tex remove vim modeline March 01, 2010
Octocat-spinner-32 checkout-b-detached.tex Use a scaling factor for all sizes May 15, 2010
Octocat-spinner-32 checkout-branch.tex remove vim modeline March 01, 2010
Octocat-spinner-32 checkout-detached.tex remove vim modeline March 01, 2010
Octocat-spinner-32 checkout-files.tex remove vim modeline March 01, 2010
Octocat-spinner-32 cherry-pick.tex use loosely dashed lines instead of deltas March 10, 2010
Octocat-spinner-32 commit-amend.tex add highlight for new commits / branches March 08, 2010
Octocat-spinner-32 commit-detached.tex add highlight for new commits / branches March 08, 2010
Octocat-spinner-32 commit-maint.tex add highlight for new commits / branches March 08, 2010
Octocat-spinner-32 commit-master.tex add highlight for new commits / branches March 08, 2010
Octocat-spinner-32 common.tex Use a scaling factor for all sizes May 15, 2010
Octocat-spinner-32 conventions.tex Use a scaling factor for all sizes May 15, 2010
Octocat-spinner-32 diff.tex remove vim modeline March 01, 2010
Octocat-spinner-32 index-de.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-en.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-es.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-fr.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-it.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-ja.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-ko.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-pt.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-ru.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-sk.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-vi.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index-zh-cn.html build from 11281a4 March 02, 2014
Octocat-spinner-32 index.html build from 11281a4 March 02, 2014
Octocat-spinner-32 merge-ff.tex remove vim modeline March 01, 2010
Octocat-spinner-32 merge.tex Use a scaling factor for all sizes May 15, 2010
Octocat-spinner-32 publish publish: back up and restore old index; use add -f February 08, 2010
Octocat-spinner-32 rebase-onto.tex use loosely dashed lines instead of deltas March 10, 2010
Octocat-spinner-32 rebase.tex use loosely dashed lines instead of deltas March 10, 2010
Octocat-spinner-32 reset-commit.tex remove vim modeline March 01, 2010
Octocat-spinner-32 reset-files.tex remove vim modeline March 01, 2010
Octocat-spinner-32 reset.tex remove vim modeline March 01, 2010
Octocat-spinner-32 translate-en.html build from c120571 April 26, 2012
Octocat-spinner-32 visual-git-guide.css build from 95daae6 February 04, 2012
Octocat-spinner-32 visual-git-guide.js build from b36dd1c October 03, 2013
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/Ti*k*Z. I originally tried using Graphviz, but unfortunately there is no way to tell it how to lay out the graph exactly. Using Ti*k*Z, 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.

Building from Source

First, the following must be installed:

sudo apt-get install texlive texlive-fonts-extra pdf2svg imagemagick

Then, build the images:

make

Finally, create the gh-pages branch:

make gh-pages

License

Copyright © 2010, Mark Lodato. Japanese translation © 2010, Kazu Yamamoto. Korean translation © 2011, Sean. Russian translation © 2012, Alex Sychev. French translation © 2012, Michel Lefranc. Chinese translation © 2012, wych. Spanish translation © 2012, Lucas Videla. Italian translation © 2012, Daniel Londero. German translation © 2013, Martin Funk. Vietnamese translation © 2013, Hoat Le. Slovak translation © 2013 Ľudovít Lučenič. Portuguese translation © 2014 Gustavo de Oliveira 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.