From 521113eba11642e7e12996090b533e6805301eab Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 19 Jun 2020 12:29:23 +0100 Subject: [PATCH 01/16] Wrap readme at 100 lines and add documentation about auto-downloads --- README.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d02b0d4..ac61162 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is a presentation about Git. To build it, you will need make, pdflatex and ansi-to-svg and inkscape. -To build the main pd, run: +To build the main pdf, run: ```bash make main.pdf @@ -26,7 +26,9 @@ make only-notes.pdf ## Auto Images -The build system will generate certain types of graphics for the presentation as part of the build system. The resultant files will always go in the `auto-images` folder. As a result, this folder is not under version control. +The build system will generate certain types of graphics for the presentation as part of the build +system. The resultant files will always go in the `auto-images` folder. As a result, this folder is +not under version control. In latex, all you need to do is @@ -44,13 +46,16 @@ What is a presentation without an xkcd comic? \includegraphics[]{auto-xkcd-.png} ``` -If the above is included in the latex document, the XKCD comic with the specified ID will be downloaded and embedded in the pdf. +If the above is included in the latex document, the XKCD comic with the specified ID will be +downloaded and embedded in the pdf. ### Shell Output -I am still not aware of aware of a reliable way to include ansi coloured shell output into a latex document. I also don't want to include loads of high-res screenshots in my Git repo. +I am still not aware of aware of a reliable way to include ansi coloured shell output into a latex +document. I also don't want to include loads of high-res screenshots in my Git repo. -The work around I have come up with is to save the raw ansi output to a wile in `shell-output`. This normally involves forcing an application to output in colour: +The work around I have come up with is to save the raw ansi output to a wile in `shell-output`. This +normally involves forcing an application to output in colour: ```bash git -c color.status=always status > shell-output/git-status.out @@ -63,3 +68,14 @@ git -c color.status=always status > shell-output/git-status.out ``` The build system will convert the ansi output into an embeddable PDF that LaTeX will embed. + +### Online images + +In order to download an image from the internet and embed it in the presentation, you need do +provide the extension and the base64 encoded URL. + +```latex +\includegraphics[]{auto-download-.png} +``` + + From 92cdfebd8abd2d0518d90efc8b24e5a38fa5f472 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 3 Aug 2020 10:30:37 +0100 Subject: [PATCH 02/16] Re-ordered and organised some bits --- greeting.py | 6 -- main.latex | 192 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 117 insertions(+), 81 deletions(-) delete mode 100755 greeting.py diff --git a/greeting.py b/greeting.py deleted file mode 100755 index f0a9e45..0000000 --- a/greeting.py +++ /dev/null @@ -1,6 +0,0 @@ -import sys - def main(): - print("Hello") - - if __name__ == "__main__": - main() diff --git a/main.latex b/main.latex index 2c135bd..ade48cf 100644 --- a/main.latex +++ b/main.latex @@ -35,7 +35,11 @@ \usetheme{default} \beamertemplatenavigationsymbolsempty -\hypersetup{pdfpagemode=UseNone} % don't show bookmarks on initial view +\hypersetup{% + colorlinks=true, + urlcolor=blue, + %pdfpagemode=UseNone +} % don't show bookmarks on initial view %\lstset{% % breaklines=true, @@ -70,25 +74,25 @@ Microsoft recently moved to git for version controlling Windows and Office. - I will not be able to cover everything relating to Git, it is an incredibly powerful tool. - However, hopefully I will be able to give you enough to get started and at least understand the - official documentation. } \begin{frame} \frametitle{Aims} - I am obviously not going to be able to go over everything that git does. + \begin{itemize} - \item I don't know everything Git does - \item Git does LOADS of stuff + \item Go through some basic operations to help you use git + \item Give you enough of a grounding to understand the official documentation \end{itemize} + \note{% + I am obviously not going to be able to go over everything that git does because it does so much. + Hopefully after this you will be able to use Git well for most day-to-day tasks. Git has very compressive documentation. I hope that this will also give you enough of a background to understand the documentation. - \note{% } \end{frame} + \begin{frame} \frametitle{What is Git} @@ -114,6 +118,21 @@ } \end{frame} +\begin{frame} + \frametitle{What is Git} + + \begin{center} + \Huge Git $\ne$ Github + \end{center} + + \note{% + Although the names are similar, Git and Github are separate projects. Github is a Microsoft + owned, closed source company that is a remote repository for Git projects. + + There are others such as Bitbucket, Gitlab, Gitea + } +\end{frame} + \begin{frame} \frametitle{Obligitary XKCD Comic} @@ -159,7 +178,7 @@ can really help. git --version \end{minted} - \href{https://gitforwindows.org/}{Git for Windows: https://gitforwindows.org/} + Git for Windows: \href{https://gitforwindows.org/}{https://gitforwindows.org/} \note{% Git is probably already installed if you are on a Linux system. However, if not, it will @@ -385,64 +404,6 @@ can really help. } \end{frame} -\begin{frame} - \frametitle{Commits / Branches} - \begin{center} - \begin{tikzpicture} - %\draw (-1.5,-1.5) rectangle (7.5,1.5); - %\node at (-2.5,0) {master}; - \node[commit] at (0,0) (commit1) {}; - \node[commit] at (2,0) (commit2) {A}; - \node[commit] at (4,0) (commit3) {B}; - \node[commit] at (4,-2) (commit3b) {C}; - \draw[arrow] (commit1) -- (commit2); - \draw[arrow] (commit2) -- (commit3); - \draw[arrow] (commit2) -- (commit3b); - \end{tikzpicture} - \end{center} - \note{% - The linear graph we just saw is an overly simplistic representation. In reality, Git - represents history using a Directed acyclic graph which allows parents to be shared my - multiple commits. This is useful because it allows for Branches. We will look at these a bit - more later. - - It is good practice to develop features on a separate branch. This allows for multiple - people to work on a project as well as allowing things like bug-fixes to be deployed without - having to worry about interference from a new feature. - } -\end{frame} - -\begin{frame} - \frametitle{Commits / Branches} - \begin{center} - \begin{tikzpicture} - %\draw (-1.5,-1.5) rectangle (7.5,1.5); - %\node at (-2.5,0) {master}; - \node[commit] at (0,0) (commit1) {}; - \node[commit] at (2,0) (commit2) {}; - \node[commit] at (5,0) (commit4) {A}; - \node[commit] at (8,0) (commit5) {C}; - \node[commit] at (4,-2) (commit3b) {}; - \node[commit] at (6,-2) (commit4b) {B}; - \draw[arrow] (commit1) -- (commit2); - \draw[arrow] (commit2) -- (commit4); - \draw[arrow] (commit4) -- (commit5); - \draw[arrow] (commit2) -- (commit3b); - \draw[arrow] (commit3b) -- (commit4b); - \draw[arrow] (commit4b) -- (commit5); - \end{tikzpicture} - \end{center} - \note{% - As well as 2 commits' ability to share a parent, the opposite is also true, Here, we see - that a commit is able to have multiple parents. - - This is called a merge commit - because it merges two branches. In a lot of situations git - is smart enough to auto-merge branches although at times human intervention is necessary. - - By default, git creates a branch called Master when you create a repository. - } -\end{frame} - \begin{frame} \frametitle{Create a repository} @@ -675,6 +636,8 @@ can really help. } \end{frame} + + \begin{frame} \frametitle{References} \begin{itemize} @@ -732,15 +695,89 @@ can really help. } \end{frame} - -\begin{frame}[fragile] +\begin{frame} \frametitle{Branches} \begin{itemize} + \item By default Git will create a branch called Master (maybe?). \item Allows multiple features to be developed in parallel without interference. \item Allows multiple people to collaborate easily. \end{itemize} + \note{% + So, when I originally wrote this slide, git would create a branch called master by default. + The convention was that this was your "main" branch. Currently on my system it still does + although there is a movement to switch the default to main or primary or something similar. + + I have no intentions to make this a political talk so make of it what you want. + } + +\end{frame} + +\begin{frame} + \frametitle{Commits / Branches} + \begin{center} + \begin{tikzpicture} + %\draw (-1.5,-1.5) rectangle (7.5,1.5); + %\node at (-2.5,0) {master}; + \node[commit] at (0,0) (commit1) {}; + \node[commit] at (2,0) (commit2) {A}; + \node[commit] at (4,0) (commit3) {B}; + \node[commit] at (4,-2) (commit3b) {C}; + \draw[arrow] (commit1) -- (commit2); + \draw[arrow] (commit2) -- (commit3); + \draw[arrow] (commit2) -- (commit3b); + \draw[draw=red] (-1,1) rectangle (5,-0.99); + \node[fill=red,text=white,anchor=north west] at (-1,1) {Branch 1}; + \draw[draw=green] (-1,-1) rectangle (5,-3); + \node[fill=green,text=white,anchor=north west] at (-1,-1) {Branch 2}; + \end{tikzpicture} + \end{center} + \note{% + The linear graph we just saw is an overly simplistic representation. In reality, Git + represents history using a Directed acyclic graph which allows parents to be shared my + multiple commits. This is useful because it allows for Branches. + + It is good practice to develop features on a separate branch. This allows for multiple + people to work on a project as well as allowing things like bug-fixes to be deployed without + having to worry about interference from a new feature. + } +\end{frame} + +\begin{frame} + \frametitle{Commits / Branches} + \begin{center} + \begin{tikzpicture} + %\draw (-1.5,-1.5) rectangle (7.5,1.5); + %\node at (-2.5,0) {master}; + \node[commit] at (0,0) (commit1) {}; + \node[commit] at (2,0) (commit2) {}; + \node[commit] at (5,0) (commit4) {A}; + \node[commit] at (8,0) (commit5) {C}; + \node[commit] at (4,-2) (commit3b) {}; + \node[commit] at (6,-2) (commit4b) {B}; + \draw[arrow] (commit1) -- (commit2); + \draw[arrow] (commit2) -- (commit4); + \draw[arrow] (commit4) -- (commit5); + \draw[arrow] (commit2) -- (commit3b); + \draw[arrow] (commit3b) -- (commit4b); + \draw[arrow] (commit4b) -- (commit5); + \draw[draw=red] (-1,1) rectangle (9,-0.99); + \node[fill=red,text=white,anchor=north west] at (-1,1) {Branch 1}; + \draw[draw=green] (-1,-1) rectangle (9,-3); + \node[fill=green,text=white,anchor=north west] at (-1,-1) {Branch 2}; + \end{tikzpicture} + \end{center} + \note{% + As well as 2 commits' ability to share a parent, the opposite is also true, Here, we see + that a commit is able to have multiple parents. + + This is called a merge commit - because it merges two branches. In a lot of situations git + is smart enough to auto-merge branches although at times human intervention is necessary. + } +\end{frame} + +\begin{frame}[fragile] \begin{minted}{bash} # List Branches git branch # -v adds more info @@ -909,7 +946,6 @@ can really help. \begin{itemize} \item HTTP(S) \item SSH - \item GIT \item Local Filesystem \end{itemize} \end{itemize} @@ -1055,16 +1091,22 @@ can really help. \begin{frame} \frametitle{Useful supporting tools} - \framesubtitle{RigGrep / Fd} + \framesubtitle{RipGrep / Fd / Exa} + + \textbf{FD} replaces find + \href{https://github.com/sharkdp/fd}{https://github.com/sharkdp/fd} + \textbf{RigGrep} replaces grep + \href{https://github.com/BurntSushi/ripgrep}{https://github.com/BurntSushi/ripgrep} + + \textbf{Exa} replaces ls + + \href{https://github.com/ogham/exa}{https://github.com/ogham/exa} \note{% - Alternatives to grep and find - Fd, in particular, is not a full replacement for find but does most of what you want - - Both (by default) will respect your gitignore file. + Fd and RipGrep will respect your gitignore by default. } \end{frame} From d2e40a357c8bcfc41e3dec107fab0bea9401f760 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 3 Aug 2020 10:50:48 +0100 Subject: [PATCH 03/16] Makes slides 16:9 and adds comic to first slide --- main.latex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.latex b/main.latex index ade48cf..5448a5d 100644 --- a/main.latex +++ b/main.latex @@ -1,4 +1,4 @@ -\documentclass{beamer} +\documentclass[aspectratio=169]{beamer} \usepackage{pgfpages} %showNotes%\setbeameroption{show notes on second screen=right} @@ -61,6 +61,10 @@ \author{Jonathan Hodgson (Archie)} \date{\today} +%\titlegraphic{\includegraphics[width=1cm,keepaspectratio]{auto-xkcd-1597.png}) + \institute{ + \includegraphics[width=\textwidth,height=.5\textheight,keepaspectratio]{auto-xkcd-1597.png}% + } \begin{document} From 79a2042c1add8b7326afc7e2187ddd38c6e9fe0f Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 3 Aug 2020 11:04:10 +0100 Subject: [PATCH 04/16] Removes some of the initial slides The presentation is already quite long, some of this is pretty unnecesary --- main.latex | 61 +++++++++++++----------------------------------------- 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/main.latex b/main.latex index 5448a5d..a38d950 100644 --- a/main.latex +++ b/main.latex @@ -69,32 +69,23 @@ \begin{document} -\frame{\titlepage} - -\note{% - A few people recently have asked me about Git. - - Git has become the de-facto for most situations. - - Microsoft recently moved to git for version controlling Windows and Office. - -} - -\begin{frame} - \frametitle{Aims} - - \begin{itemize} - \item Go through some basic operations to help you use git - \item Give you enough of a grounding to understand the official documentation - \end{itemize} +\frame{ + \titlepage \note{% - I am obviously not going to be able to go over everything that git does because it does so much. + A few people recently have asked me about Git. + + Git has a reputation for being hard. I think this is (at least partly) because so much of + its inner workings are abstracted away making the interface feel like magic. Not to mention + videos with titles like "Learn git in 15 minutes" + + I think that understanding a bit about how Git works under the hood will help de-mistily it. + It certainly did for me. + + Git's data model is actually quite simple (beautiful even). Understanding the basics of this + can really help. - Hopefully after this you will be able to use Git well for most day-to-day tasks. Git has very - compressive documentation. I hope that this will also give you enough of a background to - understand the documentation. } -\end{frame} +} \begin{frame} @@ -138,30 +129,6 @@ \end{frame} -\begin{frame} -\frametitle{Obligitary XKCD Comic} - \begin{center} - \includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{auto-xkcd-1597.png} - \end{center} - \note{% - I have done this - - Git has a reputation for being hard. - - It's interface abstracts away a lot of the work, meaning it's commands can feel like magic. - When it works, this is fine but unfortunately when things go wrong, you can be left - like - in this comic - with no idea how to proceed. - - It's interface can be confusing, there are some commands that do a lot (checkout) and there - are often multiple ways to achieve something. - - I think that understanding a bit about how Git works under the hood will help de-mistily it. - - Git's data model is actually quite simple (beautiful even). Understanding the basics of this -can really help. - } -\end{frame} - \begin{frame}[fragile] \frametitle{Install} From 3124da5b30047a59f0e785a52ba0de84e1c9873d Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 6 Aug 2020 11:52:41 +0100 Subject: [PATCH 05/16] Removes some old commented bits that won't be used --- main.latex | 46 +++++----------------------------------------- 1 file changed, 5 insertions(+), 41 deletions(-) diff --git a/main.latex b/main.latex index a38d950..5443e5c 100644 --- a/main.latex +++ b/main.latex @@ -214,37 +214,6 @@ } \end{frame} -%\begin{frame}[fragile] -% \frametitle{Setting It Up} -% \framesubtitle{Preferences} -% -% \textbf{Pick One} -% \begin{minted}{bash} -% # No colour -% git config --global color.ui never -% -% # Auto colour -% git config --global color.ui auto -% -% # Force colour -% git config --global color.ui always -% -% # Overide for a command -% git -c color.ui=always status > ~/some-file -% -% \end{minted} -% -% \note{% -% On Linux systems, this is set to auto by default. Might be different on a Mac. Generally -% auto is probably what you want. It will be coloured unless you are piping the output to a -% file or another process. -% -% Take note of the incorrect spelling of colour. -% -% You can override all configuration options on an individual command basis if you like. -% } -%\end{frame} - \begin{frame} \frametitle{Terminology} \framesubtitle{Objects} @@ -283,12 +252,6 @@ .2 final. .3 some. .3 files. - % .2 real-final. - % .3 some. - % .3 files. - % .2 actual-real-final. - % .3 some. - % .3 files. } \end{column} \begin{column}{0.5\textwidth} @@ -316,8 +279,9 @@ } \end{frame} + \begin{frame} - \frametitle{Model it} + \frametitle{Improve it} \begin{center} \begin{tikzpicture} %\draw (-1.5,-1.5) rectangle (7.5,1.5); @@ -337,13 +301,13 @@ \item This is a simple representation of the folder structure we saw. \item Notice that so the computer knows the order, somewhere in each ``snapshot", we include a reference to the previous snapshot. + \item This is stored along side other metadata such as a timestamp and the person + taking the snapshot. \item We then just need to record the most recent version somewhere. \end{itemize} } \end{frame} - - \begin{frame} \frametitle{Commits} \begin{center} @@ -352,7 +316,7 @@ %\node at (-2.5,0) {master}; \node[commit] at (0,0) (commit1) {93e4d3d\ldots}; \node[commit] at (3,0) (commit2) {2557962\ldots}; - \node[commit] at (6,0) (commit3) {od68560\ldots}; + \node[commit,draw=red] at (6,0) (commit3) {od68560\ldots}; \draw[arrow] (commit1) -- (commit2); \draw[arrow] (commit2) -- (commit3); \node[draw,text width=1.8cm,anchor=north,align=center] at (0, -1.5) {\small \vdots\\[0.1cm] }; From 5b14dc3e47addfdd8629827fdf3f63b8fd7b2288 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 6 Aug 2020 15:05:37 +0100 Subject: [PATCH 06/16] Organises presentation some more --- main.latex | 364 ++++++++++++++++++++++++++++------------------------- 1 file changed, 196 insertions(+), 168 deletions(-) diff --git a/main.latex b/main.latex index 5443e5c..82bd6f2 100644 --- a/main.latex +++ b/main.latex @@ -21,8 +21,6 @@ \tikzstyle{branch} = [ellipse, text centered, text=green] \tikzstyle{arrow} = [thick, <-, draw=blue] - - \usepackage{dirtree} \usepackage{csquotes} %\usepackage{gitdags} @@ -87,7 +85,6 @@ } } - \begin{frame} \frametitle{What is Git} @@ -100,9 +97,9 @@ \end{itemize} \note{% - Git is still being developed. - Being distributed means you can work on repositories offline (Unlike SVN). + It keeps track by maintaining a series of snapshots containing all of the files and folders + at each point. It's useful even if you're working on things by your self. This presentation is version controlled. @@ -110,6 +107,8 @@ You can use it to find out when something broke. I won't be covering it today but there is a tool called git bisect that can take a unit test (or script) to analyse when something broke using a binary search. + + Being distributed means you can work on repositories offline (Unlike SVN). } \end{frame} @@ -128,6 +127,151 @@ } \end{frame} +\begin{frame} + \frametitle{Naïve Approach} + \begin{columns} + \begin{column}{0.5\textwidth} + \dirtree{% + .1 Project. + .2 draft. + .3 some. + .3 files. + .2 final-draft. + .3 some. + .3 files. + .2 final. + .3 some. + .3 files. + } + \end{column} + \begin{column}{0.5\textwidth} + \textbf{Pros} + \begin{itemize} + \item Simple + \item No dependencies + \item No Learning curve + \end{itemize} + \vspace{1em} + \textbf{Cons} + \begin{itemize} + \item Difficult to collaborate + \item Lot's of wasted disk space + \item Hard to find particular versions of files + \end{itemize} + \end{column} + \end{columns} + \note{% + There are many approaches you could take to version control + + I think, being honest, we have all done this. This sort of works, if you're working on + something by yourself. Once you start collaborating on software, you are going to have a bad + time. + + You could add time stamps and zip up changes when you need to collaborate. + + Git has a well thought out model that allows us to address these problems. + } +\end{frame} + +\begin{frame} + \frametitle{Files and Folders} + + \textbf{Blob} In Git, a file is called a blob. + + \textbf{Tree} In Git, a directory is called a tree. + + + \note{% + Git needs a way of modeling files and folders in a file system independent way. + + These concepts are pretty familiar. A tree can contain other trees or blobs. + + } +\end{frame} + + +\begin{frame} + \frametitle{Commits} + \framesubtitle{(Snapshots)} + \begin{center} + \begin{tikzpicture} + %\draw (-1.5,-1.5) rectangle (7.5,1.5); + %\node at (-2.5,0) {master}; + \node[commit,minimum size=2cm] at (0,0) (commit1) {Draft}; + \node[commit,minimum size=2cm] at (3,0) (commit2) {Final Draft}; + \node[commit,minimum size=2cm,draw=red] at (6,0) (commit3) {Final}; + \draw[arrow] (commit1) -- (commit2); + \draw[arrow] (commit2) -- (commit3); + \node[draw,text width=1.8cm,anchor=north,align=center] at (0, -1.5) {\small \vdots\\[0.1cm] }; + \node[draw,text width=1.8cm,anchor=north,align=center] at (3, -1.5) {\small \vdots\\[0.1cm] Draft }; + \node[draw,text width=1.8cm,anchor=north,align=center] at (6, -1.5) {\small \vdots\\[0.1cm] Final Draft }; + \end{tikzpicture} + \end{center} + \note{% + \begin{itemize} + \item We could then think of history as a linear series of snapshots. + \item Each circle here represents a snapshot. + \item The previous snapshot is referenced somewhere in each snapshot. + \item We then just need to record the most recent version somewhere. + \end{itemize} + } +\end{frame} + +\begin{frame} + \frametitle{Commits} + \begin{center} + \begin{tikzpicture} + %\draw (-1.5,-1.5) rectangle (7.5,1.5); + %\node at (-2.5,0) {master}; + \node[commit] at (0,0) (commit1) {93e4d3d\ldots}; + \node[commit] at (3,0) (commit2) {2557962\ldots}; + \node[commit,draw=red] at (6,0) (commit3) {od68560\ldots}; + \draw[arrow] (commit1) -- (commit2); + \draw[arrow] (commit2) -- (commit3); + \node[draw,text width=1.8cm,anchor=north,align=center] at (0, -1.5) {\small \vdots\\[0.1cm] }; + \node[draw,text width=1.8cm,anchor=north,align=center] at (3, -1.5) {\small \vdots\\[0.1cm] 93e4d3d\ldots }; + \node[draw,text width=1.8cm,anchor=north,align=center] at (6, -1.5) {\small \vdots\\[0.1cm] 2557962\ldots }; + \end{tikzpicture} + \end{center} + \note{% + \begin{itemize} + \item Rather than human readable names, Git references each snapshot (called a commit) + by a cryptographic hash. Currently using a hardened sha1 but there is an effort to + move to sha256. + \item Similarly to the model above, each commit references the previous (except the + first obviously) + \item The commit also includes meta information such as the committer, a timestamp and a + message. + \item We will look at this in more detail a bit later. + \end{itemize} + + } +\end{frame} + +\begin{frame} + \frametitle{Staging Area} + \begin{itemize} + \item Sometimes called the git index + \item An intermediate area in which you can pick files to be included in the next commit. + \item Also allows you to exclude some files from your version history. + \begin{itemize} + \item Log files + \item Binary files + \item Minified files + \end{itemize} + \end{itemize} + \note{% + This is the last thing before we start actually doing stuff (promise). + + This is particularly useful if you have multiple logically unrelated changes and want to + make separate snapshots for each. + + Also useful if when programming you write your tests along side your code, you would + normally want those to be separate snapshots. + + We will talk about .gitignore later which is another way of ignoring files + } +\end{frame} \begin{frame}[fragile] \frametitle{Install} @@ -214,132 +358,6 @@ } \end{frame} -\begin{frame} - \frametitle{Terminology} - \framesubtitle{Objects} - - \textbf{Blob} In Git, a file is called a blob. - - \textbf{Tree} In Git, a directory is called a tree. - - \textbf{Commit} A snapshot of your code - - % All of these are referenced by a hash and stored in the \mintinline{bash}{.git/objects/} - % directory. - - \note{% - Technically, a blob is kind of like an inode on the file system so also represents symbolic - links. - - There are some other types such as submodules but I won't be addressing them in this - presentation. - } -\end{frame} - - -\begin{frame} - \frametitle{Naïve Approach} - \begin{columns} - \begin{column}{0.5\textwidth} - \dirtree{% - .1 Project. - .2 draft. - .3 some. - .3 files. - .2 final-draft. - .3 some. - .3 files. - .2 final. - .3 some. - .3 files. - } - \end{column} - \begin{column}{0.5\textwidth} - \textbf{Pros} - \begin{itemize} - \item Simple - \item No dependencies - \item No Learning curve - \end{itemize} - \vspace{1em} - \textbf{Cons} - \begin{itemize} - \item Difficult to collaborate - \item Lot's of wasted disk space - \item Can be difficult to work out chronological order - \end{itemize} - \end{column} - \end{columns} - \note{% - I think, being honest, we have all done this. This sort of works, if you're working on - something by yourself. Once you start collaborating on software, you are going to have a bad - time. - - However, this is a simple approach and not a million miles from what Git does internally. - } -\end{frame} - - -\begin{frame} - \frametitle{Improve it} - \begin{center} - \begin{tikzpicture} - %\draw (-1.5,-1.5) rectangle (7.5,1.5); - %\node at (-2.5,0) {master}; - \node[commit,minimum size=2cm] at (0,0) (commit1) {Draft}; - \node[commit,minimum size=2cm] at (3,0) (commit2) {Final Draft}; - \node[commit,minimum size=2cm,draw=red] at (6,0) (commit3) {Final}; - \draw[arrow] (commit1) -- (commit2); - \draw[arrow] (commit2) -- (commit3); - \node[draw,text width=1.8cm,anchor=north,align=center] at (0, -1.5) {\small \vdots\\[0.1cm] }; - \node[draw,text width=1.8cm,anchor=north,align=center] at (3, -1.5) {\small \vdots\\[0.1cm] Draft }; - \node[draw,text width=1.8cm,anchor=north,align=center] at (6, -1.5) {\small \vdots\\[0.1cm] Final Draft }; - \end{tikzpicture} - \end{center} - \note{% - \begin{itemize} - \item This is a simple representation of the folder structure we saw. - \item Notice that so the computer knows the order, somewhere in each ``snapshot", we - include a reference to the previous snapshot. - \item This is stored along side other metadata such as a timestamp and the person - taking the snapshot. - \item We then just need to record the most recent version somewhere. - \end{itemize} - } -\end{frame} - -\begin{frame} - \frametitle{Commits} - \begin{center} - \begin{tikzpicture} - %\draw (-1.5,-1.5) rectangle (7.5,1.5); - %\node at (-2.5,0) {master}; - \node[commit] at (0,0) (commit1) {93e4d3d\ldots}; - \node[commit] at (3,0) (commit2) {2557962\ldots}; - \node[commit,draw=red] at (6,0) (commit3) {od68560\ldots}; - \draw[arrow] (commit1) -- (commit2); - \draw[arrow] (commit2) -- (commit3); - \node[draw,text width=1.8cm,anchor=north,align=center] at (0, -1.5) {\small \vdots\\[0.1cm] }; - \node[draw,text width=1.8cm,anchor=north,align=center] at (3, -1.5) {\small \vdots\\[0.1cm] 93e4d3d\ldots }; - \node[draw,text width=1.8cm,anchor=north,align=center] at (6, -1.5) {\small \vdots\\[0.1cm] 2557962\ldots }; - \end{tikzpicture} - \end{center} - \note{% - \begin{itemize} - \item Rather than human readable names, Git references each snapshot (called a commit) - by a cryptographic hash. Currently using a hardened sha1 but there is an effort to - move to sha256. - \item Similarly to the model above, each commit references the previous (except the - first obviously) - \item The commit also includes meta information such as the committer, a timestamp and a - message. - \item We will look at this in more detail a bit later. - \end{itemize} - - } -\end{frame} - - \begin{frame} \frametitle{Create a repository} \begin{center} @@ -377,14 +395,6 @@ git add -A \end{minted} \note{% - The staging area is where you put things that you want to be committed. - - It can often be useful to manually split changes up into different commits. You might be - working on feature A and feature B simultaneously. It is good practice to have each feature - as a separate commit so you could add feature A to the staging area, commit it, then do the - same for feature B. - - We will talk about \mintinline{bash}{.gitignore} in a bit. } \end{frame} @@ -401,11 +411,8 @@ } \end{frame} -\begin{frame}[fragile] +\begin{frame} \frametitle{Committing} - \begin{minted}{bash} - git commit - \end{minted} \begin{itemize} \item First line should be concise summary around 50 chars @@ -1008,6 +1015,52 @@ } \end{frame} +\begin{frame} + \frametitle{Issues} + \begin{itemize} + \item Not part of Git, rather something most Git hosting providers offer. + \item You can normally reference issues in commit messages using \# symbol. + \end{itemize} + \note{% + Demonstrate this in a browser using Github + } + +\end{frame} + +\begin{frame} + \frametitle{Pull Requests} + \framesubtitle{Merge Requests} + + \begin{enumerate} + \item Fork + \item Clone + \item Branch + \item Commit + \item Push + \end{enumerate} + + \note{% + \begin{itemize} + \item Not part of Git, rather something most Git hosting providers offer. + \item It allows for people to contribute code to repositories that they don't have + write access to + \end{itemize} + } +\end{frame} + +\begin{frame} + \frametitle{Useful supporting tools} + \framesubtitle{Shell Integration} + Git ships with completion for bash, zsh and tcsh. You may need to source it in the relevant rc + file. + + Prompt customisation is available out of the box for bash and zsh. + \note{% + If you haven't ever tried zsh, give it a shot. Tab completion is so much more useful than + Bash's. + } +\end{frame} + \begin{frame} \frametitle{Useful supporting tools} \framesubtitle{Bat} @@ -1045,18 +1098,6 @@ } \end{frame} -\begin{frame} - \frametitle{Useful supporting tools} - \framesubtitle{Delta} - \begin{center} - \includegraphics[width=\textwidth,height=0.6\textheight,keepaspectratio]{auto-download-aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vNTIyMDUvNjUyNDg1MjUtMzIyNTA0ODAtZGFlYS0xMWU5LTk5NjUtMWEwNWM2YTRiZGY0LnBuZw==.png} - \end{center} - \href{https://github.com/dandavison/delta}{https://github.com/dandavison/delta} - \note{% - This is a tool that can make your diff output look better. - } -\end{frame} - \begin{frame} \frametitle{Useful supporting tools} \framesubtitle{BFG Repo Cleaner} @@ -1070,19 +1111,6 @@ } \end{frame} -\begin{frame} - \frametitle{Useful supporting tools} - \framesubtitle{Shell Integration} - Git ships with completion for bash, zsh and tcsh. You may need to source it in the relevant rc - file. - - Prompt customisation is available out of the box for bash and zsh. - \note{% - If you haven't ever tried zsh, give it a shot. Tab completion is so much more useful than - Bash's. - } -\end{frame} - \begin{frame} \frametitle{Useful supporting tools} \framesubtitle{Pass} From 19a28245e6639c48d464f2cc9a58aede561f39ae Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 12:16:42 +0100 Subject: [PATCH 07/16] Add another references slide and re-orders supporting tools --- main.latex | 77 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 15 deletions(-) diff --git a/main.latex b/main.latex index 82bd6f2..f9ff9a2 100644 --- a/main.latex +++ b/main.latex @@ -186,6 +186,9 @@ These concepts are pretty familiar. A tree can contain other trees or blobs. + At its core, Git is a content addressed storage tool. All files and folders are addressed by + a (hardened) sha1 hash. + } \end{frame} @@ -590,8 +593,35 @@ \end{itemize} \note{% We've seen a couple of these (sort of) + } +\end{frame} - Master and Head +\begin{frame} + \frametitle{References} + \begin{itemize} + \item Branches + \begin{itemize} + \item Parallel development + \end{itemize} + \item Tags + \begin{itemize} + \item Special points in history (Release versions) + \end{itemize} + \item HEAD + \begin{itemize} + \item Current position in history + \end{itemize} + \end{itemize} + \note{% + Branches allow for parallel development, individually or multiple people. We well look at + these in more detail in a minute. + + Tags allow you to mark special commits. Normally this is used for release versions or + similar. + + HEAD refers to the commit or branch you are currently looking at. We will see in a minute + that you can revert a whole project to a previous point in time. This is how git knows + where (when?) you are. } \end{frame} @@ -1057,7 +1087,37 @@ Prompt customisation is available out of the box for bash and zsh. \note{% If you haven't ever tried zsh, give it a shot. Tab completion is so much more useful than - Bash's. + Bach's. + } +\end{frame} + +\begin{frame} + \frametitle{Useful supporting tools} + \framesubtitle{Editor Plugin} + \begin{itemize} + \item Git Gutters + \item Easy staging of parts of a file + \item Merge Conflict Resolution + \end{itemize} + \note{% + There are obviously hundreds of editors so find one that works well with yours. + + I think Atom and VS Code have built in integration. + + I use vim-fugitive. I've heard good things about magit for emacs. + } +\end{frame} + +\begin{frame} + \frametitle{Useful supporting tools} + \framesubtitle{BFG Repo Cleaner} + You'll need something like this when you realise you have just committed your ssh keys + + \href{https://rtyley.github.io/bfg-repo-cleaner/}{https://rtyley.github.io/bfg-repo-cleaner/} + \note{% + For the time that you accidentally commit your ssh keys. + + I accidentally committed a database for an Woocommerce site. } \end{frame} @@ -1098,19 +1158,6 @@ } \end{frame} -\begin{frame} - \frametitle{Useful supporting tools} - \framesubtitle{BFG Repo Cleaner} - You'll need something like this when you realise you have just committed your ssh keys - - \href{https://rtyley.github.io/bfg-repo-cleaner/}{https://rtyley.github.io/bfg-repo-cleaner/} - \note{% - For the time that you accidentally commit your ssh keys. - - I accidentally committed a database for an Woocommerce site. - } -\end{frame} - \begin{frame} \frametitle{Useful supporting tools} \framesubtitle{Pass} From 8d49cebcc71e708ea4bded17bc6906085ff6a220 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 13:04:50 +0100 Subject: [PATCH 08/16] Adds a couple of notes and adds to tikz merge pictures --- main.latex | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/main.latex b/main.latex index f9ff9a2..4d44494 100644 --- a/main.latex +++ b/main.latex @@ -443,6 +443,7 @@ \framesubtitle{Commit early, commit often} \begin{itemize} \item Every time you complete a small change or fix a bug + \item For each point on a detailed to-do list \item You don't normally want to commit broken code (intentionally at least) \item In some instances you might want to auto-commit - but probably not too often. \begin{itemize} @@ -501,6 +502,8 @@ \note{% Diff is pretty smart. It will normally work for whatever combinations of commits, references (more on that later) or files. + + Change Hello to Hello World } \end{frame} @@ -696,12 +699,14 @@ \node[commit] at (2,0) (commit2) {A}; \node[commit] at (4,0) (commit3) {B}; \node[commit] at (4,-2) (commit3b) {C}; + \node[anchor=west] at (4.5,0.5) {+Bugfix}; + \node[anchor=west] at (4.5,-2.5) {+Feature}; \draw[arrow] (commit1) -- (commit2); \draw[arrow] (commit2) -- (commit3); \draw[arrow] (commit2) -- (commit3b); - \draw[draw=red] (-1,1) rectangle (5,-0.99); + \draw[draw=red] (-1,1) rectangle (6.5,-0.99); \node[fill=red,text=white,anchor=north west] at (-1,1) {Branch 1}; - \draw[draw=green] (-1,-1) rectangle (5,-3); + \draw[draw=green] (-1,-1) rectangle (6.5,-3); \node[fill=green,text=white,anchor=north west] at (-1,-1) {Branch 2}; \end{tikzpicture} \end{center} @@ -728,15 +733,18 @@ \node[commit] at (8,0) (commit5) {C}; \node[commit] at (4,-2) (commit3b) {}; \node[commit] at (6,-2) (commit4b) {B}; + \node[anchor=west] at (5.5,0.5) {+Bugfix}; + \node[anchor=west] at (6.5,-2.5) {+Feature}; + \node[anchor=south west] at (8.7,-0.2) {\parbox{\textwidth}{+Bugfix \\ +Feature}}; \draw[arrow] (commit1) -- (commit2); \draw[arrow] (commit2) -- (commit4); \draw[arrow] (commit4) -- (commit5); \draw[arrow] (commit2) -- (commit3b); \draw[arrow] (commit3b) -- (commit4b); \draw[arrow] (commit4b) -- (commit5); - \draw[draw=red] (-1,1) rectangle (9,-0.99); + \draw[draw=red] (-1,1) rectangle (10.5,-0.99); \node[fill=red,text=white,anchor=north west] at (-1,1) {Branch 1}; - \draw[draw=green] (-1,-1) rectangle (9,-3); + \draw[draw=green] (-1,-1) rectangle (10.5,-3); \node[fill=green,text=white,anchor=north west] at (-1,-1) {Branch 2}; \end{tikzpicture} \end{center} From c1b330189ee00bcba695b41f12d75aeba4126a7a Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 13:21:01 +0100 Subject: [PATCH 09/16] Adds lfs and crypt to useful tools --- main.latex | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/main.latex b/main.latex index 4d44494..b9295c2 100644 --- a/main.latex +++ b/main.latex @@ -1129,6 +1129,34 @@ } \end{frame} +\begin{frame} + \frametitle{Useful supporting tools} + \framesubtitle{Git Crypt} + + For storing sensitive information in a git repository. + + \href{https://github.com/AGWA/git-crypt}{https://github.com/AGWA/git-crypt} + \note{% + This will encrypt files with gpg key(s) and transparently decrypt them on the file system. + } +\end{frame} + +\begin{frame} + \frametitle{Useful supporting tools} + \framesubtitle{Git Large File Storage} + + A solution to the issue of storing binary files + + \href{https://git-lfs.github.com/}{https://git-lfs.github.com/} + \note{% + As mentioned, git is not good at storing binary files because they can't be compressed or + diff-ed or merged. + + This allows you to store links to large files and transparently add them to the file system + as though they were normal git blobs. + } +\end{frame} + \begin{frame} \frametitle{Useful supporting tools} \framesubtitle{Bat} From 56f90b3daecec254c1aab9e2f103ac2f66d0bf0d Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 13:39:41 +0100 Subject: [PATCH 10/16] Removes slide on HEAD I don't think it needs its own slide now that I have introduced the slide outlining the different types of reference --- main.latex | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/main.latex b/main.latex index b9295c2..a4a95b8 100644 --- a/main.latex +++ b/main.latex @@ -653,23 +653,6 @@ } \end{frame} -\begin{frame} - \frametitle{References} - \framesubtitle{HEAD} - \begin{itemize} - \item The HEAD references is directly in the \mintinline{bash}{.git} folder. - \item It refers to the ``current" commit. It is how git knows where you are. - \item This normally refers to a branch's head commit. - \item In some situations it will refer to a commit directly. - \end{itemize} - \note{% - Not sure why it is not in refs folder - - If it refers directly to a commit, the repository is in what is called a ``detached head" - state. - } -\end{frame} - \begin{frame} \frametitle{Branches} @@ -761,12 +744,15 @@ \begin{minted}{bash} # List Branches git branch # -v adds more info + # Create a branch called test git branch test # or cp ~/.git/refs/heads/master ~/.git/refs/heads/test + # Switch to new branch git switch test # or git checkout test + # Create and switch in one go git switch -c test # or git checkout -b test From e3e5f7f78865028614bc0ac826f4ff8816d7405a Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 13:42:54 +0100 Subject: [PATCH 11/16] Adjusts add-remote script to cd before removing remote --- shell/add-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/add-remote b/shell/add-remote index a6ac624..ddfb0f3 100755 --- a/shell/add-remote +++ b/shell/add-remote @@ -1,5 +1,6 @@ #!/usr/bin/env bash +cd /tmp/demo ( rm -rf /tmp/demo-remote mkdir -p /tmp/demo-remote @@ -7,7 +8,6 @@ git init --bare /tmp/demo-remote git remote remove origin ) > /dev/null 2>&1 -cd /tmp/demo echo '$ git remote add origin /tmp/demo-remote' git remote add origin /tmp/demo-remote echo '$ git remote' From 703737785a0d3cdcd2c471dbd3a6ba8599441427 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 14:05:32 +0100 Subject: [PATCH 12/16] Add download link to readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ac61162..a721812 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ This is a presentation about Git. +## Download + +If you just want to download a copy of the presentation, you can do so [here](https://git.jonathanh.co.uk/attachments/b2f284a7-d9fe-4dda-b8e4-485d79cdfa6e). + ## Build To build it, you will need make, pdflatex and ansi-to-svg and inkscape. From 534671c188aa0c5211d2f2e1aa17f3b6e1a24867 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Aug 2020 18:34:40 +0100 Subject: [PATCH 13/16] Makes date uk format --- main.latex | 1 + 1 file changed, 1 insertion(+) diff --git a/main.latex b/main.latex index a4a95b8..4e05151 100644 --- a/main.latex +++ b/main.latex @@ -15,6 +15,7 @@ \usepackage{amsmath} \usepackage{pdfpages} \usepackage{tikz} +\usepackage[UKenglish]{babel}% \usetikzlibrary{shapes.geometric, arrows} \tikzstyle{commit} = [circle, text centered, line width=2, minimum size=1.5cm, draw=blue, fill=blue!80, text=white] From 4456e16333e8472983931b2666a5f015fa8b9f1c Mon Sep 17 00:00:00 2001 From: Bob Bobbington Date: Fri, 28 Jan 2022 10:57:04 +0000 Subject: [PATCH 14/16] Adds Cow option --- greeting.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 greeting.py diff --git a/greeting.py b/greeting.py new file mode 100644 index 0000000..463108b --- /dev/null +++ b/greeting.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import sys + +def cat(): + print("Meow") + +def dog(): + print("Woof") + +def cow(): + print("Moo") + +def main(): + if len(sys.argv) > 1 and sys.argv[1] == "cat": + cat() + elif len(sys.argv) > 1 and sys.argv[1] == "dog": + dog() + elif len(sys.argv) > 1 and sys.argv[1] == "cow": + cow() + else: + print("HELLO WORLD") + +if __name__ == "__main__": + main() From 2be367ed021b85772790ca2a61923d999f7323f8 Mon Sep 17 00:00:00 2001 From: Bob Bobbington Date: Fri, 28 Jan 2022 14:53:38 +0000 Subject: [PATCH 15/16] Some small changes to the presentation --- main.latex | 75 ++++++++++++++++++++++++++++-------------- shell/fetch-merge-pull | 2 +- shell/tree-empty-git | 4 +++ 3 files changed, 55 insertions(+), 26 deletions(-) create mode 100755 shell/tree-empty-git diff --git a/main.latex b/main.latex index 4e05151..99ee6ac 100644 --- a/main.latex +++ b/main.latex @@ -252,31 +252,6 @@ } \end{frame} -\begin{frame} - \frametitle{Staging Area} - \begin{itemize} - \item Sometimes called the git index - \item An intermediate area in which you can pick files to be included in the next commit. - \item Also allows you to exclude some files from your version history. - \begin{itemize} - \item Log files - \item Binary files - \item Minified files - \end{itemize} - \end{itemize} - \note{% - This is the last thing before we start actually doing stuff (promise). - - This is particularly useful if you have multiple logically unrelated changes and want to - make separate snapshots for each. - - Also useful if when programming you write your tests along side your code, you would - normally want those to be separate snapshots. - - We will talk about .gitignore later which is another way of ignoring files - } -\end{frame} - \begin{frame}[fragile] \frametitle{Install} @@ -375,6 +350,19 @@ } \end{frame} +\begin{frame} + \frametitle{Create a repository} + \begin{center} + \includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{auto-shell-tree-empty-git.pdf} + \end{center} + \note{% + Do this in a live terminal. MAKE SURE YOU MAKE YOUR FONT BIGGER + + Show that the \mintinline{bash}{.git} folder has been created and do a tree to show what is + in it. + } +\end{frame} + \begin{frame}[fragile] \frametitle{Git status} @@ -389,6 +377,31 @@ } \end{frame} +\begin{frame} + \frametitle{Staging Area} + \begin{itemize} + \item Sometimes called the git index + \item An intermediate area in which you can pick files to be included in the next commit. + \item Also allows you to exclude some files from your version history. + \begin{itemize} + \item Log files + \item Binary files + \item Minified files + \end{itemize} + \end{itemize} + \note{% + This is the last thing before we start actually doing stuff (promise). + + This is particularly useful if you have multiple logically unrelated changes and want to + make separate snapshots for each. + + Also useful if when programming you write your tests along side your code, you would + normally want those to be separate snapshots. + + We will talk about .gitignore later which is another way of ignoring files + } +\end{frame} + \begin{frame}[fragile] \frametitle{Staging Area} @@ -1222,4 +1235,16 @@ } \end{frame} +\begin{frame} + \frametitle{Questions} + + You can find this presentation here: + + \href{https://git.jonathanh.co.uk/GitPresentation}{https://git.jonathanh.co.uk/GitPresentation} + + \note{% + Yes, this presentation uses git for version control + } +\end{frame} + \end{document} diff --git a/shell/fetch-merge-pull b/shell/fetch-merge-pull index f8b595a..ab9cb30 100755 --- a/shell/fetch-merge-pull +++ b/shell/fetch-merge-pull @@ -22,5 +22,5 @@ git -c color.ui=always status echo '$ git log --oneline --all --graph' git -c color.ui=always log --oneline --all --graph --decorate=short -echo '$ git merge' +echo '$ git merge origin/master' git -c color.ui=always merge origin/master diff --git a/shell/tree-empty-git b/shell/tree-empty-git new file mode 100755 index 0000000..40ec961 --- /dev/null +++ b/shell/tree-empty-git @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +echo '$ tree .git' +cd /tmp/demo +tree .git From bc88d8ba595a797e9676e2d654a51710fbda459b Mon Sep 17 00:00:00 2001 From: Bob Bobbington Date: Fri, 28 Jan 2022 14:54:48 +0000 Subject: [PATCH 16/16] Fix presentation link --- main.latex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.latex b/main.latex index 99ee6ac..8ac85bc 100644 --- a/main.latex +++ b/main.latex @@ -1240,7 +1240,7 @@ You can find this presentation here: - \href{https://git.jonathanh.co.uk/GitPresentation}{https://git.jonathanh.co.uk/GitPresentation} + \href{https://git.jonathanh.co.uk/jab2870/Git-Presentation}{https://git.jonathanh.co.uk/jab2870/Git-Presentation} \note{% Yes, this presentation uses git for version control