tobiasmanske.de/latex/git-graph.tex

55 lines
1.9 KiB
TeX

\documentclass[border=4mm]{standalone}
\usepackage{url}
\usepackage{tikz}
\usepackage{color}
\definecolor{dcolor}{rgb}{0,0,0}
% \definecolor{dcolor}{rgb}{0.68, 0.05, 0.0}
\definecolor{blizzardblue}{rgb}{0.67,0.9,0.93}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}[draw=dcolor, text=dcolor,background rectangle/.style={fill=white}, show background rectangle]
\usetikzlibrary{shapes}
\usetikzlibrary{fit}
\usetikzlibrary{automata, arrows.meta, positioning}
\tikzstyle{roundnode}=[ellipse, thin, draw=dcolor, minimum width=20mm, minimum height=20mm, node distance=1.5cm, align=center, auto]
\tikzstyle{highlight}=[red,ultra thick]
\tikzset{>=latex}
\node[roundnode, dashed] (a) {none};
\node[roundnode, right=of a] (b) {cf04750};
\node[roundnode, right=of b] (bb) {cf04750};
\node[roundnode, right=of bb] (bbb) {cf04750};
\node[roundnode, below=of bb] (bc) {4db5410};
\draw[->] (bc) edge (bb);
\node[roundnode, below=of bbb] (bbc) {4db5410};
\node[roundnode, below=of bbc] (bbd) {1849c76};
\draw[->] (bbc) edge (bbb);
\draw[->] (bbd) edge (bbc);
\node[rectangle,fill=blizzardblue, draw=dcolor, right=.1cm of b, yshift=-1cm] (H) {\scriptsize HEAD};
\draw[->] (H) edge (b);
\node[rectangle,fill=blizzardblue, draw=dcolor, right=.1cm of bc, yshift=-1cm] (bH) {\scriptsize HEAD};
\draw[->] (bH) edge (bc);
\node[rectangle,fill=blizzardblue, draw=dcolor, right=.1cm of bbd, yshift=-1cm] (bbH) {\scriptsize HEAD};
\draw[->] (bbH) edge (bbd);
\draw[->, dashed] (a) edge node[above] {\tiny git commit} (b);
\draw[->, dashed] (b) edge node[above] {\tiny git commit} (bb);
\draw[->, dashed] (bb) edge node[above] {\tiny git commit} (bbb);
% * 1849c76 - (4 minutes ago) remove a file - Tobias Manske (HEAD -> master)
% * 4db5410 - (4 minutes ago) Changes some more stuff - Tobias Manske
% * cf04750 - (25 minutes ago) This is our first commit - Tobias Manske
\end{tikzpicture}
\end{document}