introduction.tex 7.86 KB
Newer Older
1 2
\documentclass[slidestop]{beamer}

Mihai's avatar
Mihai committed
3 4
\usepackage{tikz}

5 6
\input{../shared/shared.tex}

Mihai's avatar
Mihai committed
7
\author{}
8 9
\title{\courseTitle}
\providecommand{\mySubTitle}{Introduction to Version Control}
10
\providecommand{\myConference}{\courseTitle}
11
\providecommand{\myGroup}{}
12 13
\providecommand{\myDepartment}{Department of Human Genetics}
\providecommand{\myCenter}{Center for Human and Clinical Genetics}
14

15 16 17 18 19 20 21 22
\usetheme{lumc}

\begin{document}

% This disables the \pause command, handy in the editing phase.
%\renewcommand{\pause}{}

% Make the title page.
23
\makeTitleSlide{\includegraphics[width=3.5cm]{git_logo}}
24 25 26

% First page of the presentation.
\section{Introduction}
Mihai's avatar
Mihai committed
27 28 29

\section{What is version control?}
\subsection{Definition}
30
\begin{pframe}
Mihai's avatar
Mihai committed
31 32 33 34 35 36 37
  \emph{The \textbf{management of changes} to documents, computer programs, large web
        sites, and other collections of information.}\\
  --- \textcolor{darkgray}{\href{https://en.wikipedia.org/wiki/Version_control}{Wikipedia}}
  \\ \\
  \emph{A system that \textbf{records changes} to a file or set of files 
        over time so that you can recall specific versions later.}\\
  --- \textcolor{darkgray}{\href{https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control}{https://git-scm.com/}}
38

Mihai's avatar
Mihai committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
  \begin{tikzpicture}[remember picture,overlay]
    \node[xshift=-3.3cm,yshift=-7.2cm] at (current page.north east) {\includegraphics[width=4cm]{images/version_control-slide.pdf}};
  \end{tikzpicture}
\end{pframe} 

\subsection{Step by step}
\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_00.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_01.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_02.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_03.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_04.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_05.pdf}	
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_06.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_07.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_08.pdf}
 \end{center}
\end{pframe} 

\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_09.pdf}
 \end{center}
\end{pframe} 

Mihai's avatar
Mihai committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
\subsection{Local repository}
\begin{pframe}
 \begin{center}
   \includegraphics[width=\textwidth]{images/vcs_layout_local.pdf}
 \end{center}
\end{pframe}

\subsection{Central repository}
\begin{pframe}
 \begin{center}
   \includegraphics[width=\textwidth]{images/vcs_layout_central.pdf}
 \end{center}
\end{pframe}

\subsection{Distributed repositories}
\begin{pframe}
 \begin{center}
   \includegraphics[width=\textwidth]{images/vcs_layout_distributed.pdf}
 \end{center}
\end{pframe}

\begin{pframe}
 \begin{center}
   \includegraphics[width=\textwidth]{images/vcs_layout_distributed_remotes.pdf}
 \end{center}
\end{pframe}

\subsection{General features}
Mihai's avatar
Mihai committed
133 134 135
\begin{pframe}
  \begin{itemize}     
    \item Keep track of your files in an orderly manner.
136
    \begin{itemize}
Mihai's avatar
Mihai committed
137 138 139
      \item Hide old versions.
      \item Check the differences between current and older versions.
      \item Record who made changes and when.
140 141 142
    \end{itemize}
    \item Enables collaboration.
  \end{itemize}
Mihai's avatar
Mihai committed
143
\end{pframe} 
144

Mihai's avatar
Mihai committed
145
\subsection{Why should I use it?}
146
\begin{pframe}
Mihai's avatar
Mihai committed
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
  For a single user:
  \begin{itemize} 
   \item Revert files to a previous state.
   \item Revert the entire project back to a previous state.
   \item Review changes made over time.
   \item Backup.
  \end{itemize}
  \pause
  For multiple users:
    \begin{itemize}
     \item A reliable way to share files between people/computers.
     \item Allow multiple people working on the same project at the same time.
     \item Conflict resolution.
     \item See who made which changes at which time.
    \end{itemize}
162 163
\end{pframe}

Mihai's avatar
Mihai committed
164
\subsection{Why should I not use it?}
165
\begin{pframe}
Mihai's avatar
Mihai committed
166 167
  \bigskip
  
168
  \begin{itemize}
Mihai's avatar
Mihai committed
169
    \item I have my own system.
170 171
  \end{itemize}
  \pause
Mihai's avatar
Mihai committed
172 173 174 175
  \begin{tikzpicture}[remember picture,overlay]
    \node[xshift=-3.4cm,yshift=-5.4cm] at (current page.north east) {\includegraphics[width=6cm]{images/project_tree.pdf}};
  \end{tikzpicture}
\end{pframe}
176

Mihai's avatar
Mihai committed
177 178
\begin{pframe}
  A list of common excuses:
179
  \begin{itemize}
Mihai's avatar
Mihai committed
180 181 182 183 184 185
    \item I have my own system.
    \item It is too much work.
    \item I am the only one working \\ on this project.
    \item This code will not be \\ used by anyone else.
    \item The bugs can be \\ tracked forever.
    \item \ldots
186
  \end{itemize}
Mihai's avatar
Mihai committed
187 188 189 190
  
  \begin{tikzpicture}[remember picture,overlay]
    \node[xshift=-3.4cm,yshift=-5.4cm] at (current page.north east) {\includegraphics[width=6cm]{images/project_tree.pdf}};
  \end{tikzpicture}
191
\end{pframe}
192

193
\begin{pframe}
194 195 196
  A list of common excuses:
  \begin{itemize}
    \item I have my own system.
Mihai's avatar
Mihai committed
197 198 199 200
    \item It is too much work.
    \item I am the only one working \\ on this project.
    \item This code will not be \\ used by anyone else.
    \item The bugs can be \\ tracked forever.
201
    \item \ldots
202
  \end{itemize}
Mihai's avatar
Mihai committed
203
  
204 205
  Eventually leading to:
  \begin{itemize}
206 207
    \item I'm too busy rewriting the code I accidentally deleted.
  \end{itemize}
Mihai's avatar
Mihai committed
208 209 210
  \begin{tikzpicture}[remember picture,overlay]
    \node[xshift=-3.8cm,yshift=-5.6cm] at (current page.north east) {\includegraphics[width=7cm]{images/desperate.pdf}};
  \end{tikzpicture}
211
\end{pframe}
212 213

\section{Git}
214 215
\subsection{The name}
\begin{pframe}
216 217 218 219 220 221 222 223
  \emph{Git (n): A person who is deemed to be despicable or contemptible.} ---
  WordNet.
  \bigskip
  \pause

  \emph{I'm an egotistical bastard, and I name all my projects after myself.
  First ``Linux'', now ``git''.} --- Linus Torvalds.
  \bigskip
224
\end{pframe}
225

226 227
\subsection{History}
\begin{pframe}
228
  Designed to replace the commercial package \emph{BitKeeper}.
229 230 231 232 233 234 235 236 237
  \begin{itemize}
    \item Speed.
    \item Simple design.
    \item Strong support for non-linear development (thousands of parallel
      branches).
    \item Fully distributed.
    \item Able to handle large projects like the Linux kernel efficiently
      (speed and data size).
  \end{itemize}
238 239 240 241 242 243
  % The copyright holder of BitKeeper, Larry McVoy, had withdrawn gratis use of
  % the product after claiming that Andrew Tridgell had reverse-engineered the
  % BitKeeper protocols.

  % .. version 4.1, released in June 2015, has grown to over 19.5 million lines
  % of code contributed by almost 14,000 programmers.
244
\end{pframe}
245 246

\section{Remotes}
247 248
\subsection{A lot of choices}
\begin{pframe}
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
  GitHub.
  \begin{itemize}
    \item Only free for open source projects.
  \end{itemize}
  \bigskip

  SourceForge, BitBucket, Gitorious, \ldots
  \bigskip

  GitLab.
  \begin{itemize}
    \item Issue tracking.
    \item Wiki.
    \item ``Project wall''.
    \item Snippet.
    \item User profiles.
  \end{itemize}

  \vfill
268 269 270 271 272
  \permfoot{\url{https://github.com/}}
\end{pframe}

\section{GitLab demonstration}
\begin{pframe}
273
\end{pframe}
274 275

\section{Practical}
276 277
\subsection{Outline}
\begin{pframe}
278 279 280
  We are going to:
  \begin{itemize}
    \item Create and configure a user account on the GitLab server.
281
    \item Upload an \lstinline{ssh-key} to work with Git.
282 283 284
  \end{itemize}

  \vfill
285
  \permfoot{\url{https://git.lumc.nl/}}
286
\end{pframe}
287

288 289 290 291 292
\makeAcknowledgementsSlide{
  \begin{tabular}{l}
    \acknowledgements
  \end{tabular}
  \bigskip
293

294
  \hfill\includegraphics[width=3.5cm]{git_logo}
295

296 297 298 299
  \begin{tabular}{l}
    \small\url{https://git.lumc.nl/humgen/gitcourse}
  \end{tabular}
}
300

301
\end{document}