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

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

Laros's avatar
Laros committed
5
6
\input{../shared/shared.tex}

Mihai Lefter's avatar
Mihai Lefter committed
7
\author{}
Laros's avatar
Laros committed
8
9
\title{\courseTitle}
\providecommand{\mySubTitle}{Introduction to Version Control}
Laros's avatar
Laros committed
10
\providecommand{\myConference}{\courseTitle}
Laros's avatar
Laros committed
11
\providecommand{\myGroup}{}
12
13
\providecommand{\myDepartment}{Department of Human Genetics}
\providecommand{\myCenter}{Center for Human and Clinical Genetics}
Laros's avatar
Laros committed
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.
Mihai Lefter's avatar
Mihai Lefter committed
23
\makeTitleSlide{\includegraphics[width=3.5cm]{images/git_logo.pdf}}
24
25
26

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

\section{What is version control?}
\subsection{Definition}
Laros's avatar
Laros committed
30
\begin{pframe}
Mihai Lefter's avatar
Mihai Lefter 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/}}
Laros's avatar
Laros committed
38

Mihai Lefter's avatar
Mihai Lefter committed
39
40
41
42
43
  \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} 

Mihai Lefter's avatar
Mihai Lefter committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\subsection{General features}
\begin{pframe}
  \begin{itemize}     
    \item Keep track of your files in an orderly manner.
    \begin{itemize}
      \item Hide old versions.
      \item Easily access old versions.
      \item Check the differences between current and older versions.
      \item Record who made changes and when.
    \end{itemize}
    \item Enables collaboration.
  \end{itemize}
\end{pframe} 

Mihai Lefter's avatar
Mihai Lefter committed
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
\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 Lefter's avatar
Mihai Lefter committed
119
120
121
122
123
124
\begin{pframe}
 \begin{center}
  \includegraphics[width=1\textwidth]{images/vcs_example/vcs_example_10.pdf}
 \end{center}
\end{pframe} 

Mihai Lefter's avatar
Mihai Lefter committed
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
\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}

Mihai Lefter's avatar
Mihai Lefter committed
152
\subsection{Why should I use it?}
Laros's avatar
Laros committed
153
\begin{pframe}
Mihai Lefter's avatar
Mihai Lefter committed
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
  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}
Laros's avatar
Laros committed
169
170
\end{pframe}

Mihai Lefter's avatar
Mihai Lefter committed
171
\subsection{Why should I not use it?}
Laros's avatar
Laros committed
172
\begin{pframe}
Mihai Lefter's avatar
Mihai Lefter committed
173
174
  \bigskip
  
Laros's avatar
Laros committed
175
  \begin{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
176
    \item I have my own system.
Laros's avatar
Laros committed
177
178
  \end{itemize}
  \pause
Mihai Lefter's avatar
Mihai Lefter committed
179
180
181
182
  \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}
Laros's avatar
Laros committed
183

Mihai Lefter's avatar
Mihai Lefter committed
184
185
\begin{pframe}
  A list of common excuses:
Laros's avatar
Laros committed
186
  \begin{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
187
188
189
190
191
192
    \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
Laros's avatar
Laros committed
193
  \end{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
194
195
196
197
  
  \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}
Laros's avatar
Laros committed
198
\end{pframe}
Laros's avatar
Laros committed
199

Laros's avatar
Laros committed
200
\begin{pframe}
Laros's avatar
Laros committed
201
202
203
  A list of common excuses:
  \begin{itemize}
    \item I have my own system.
Mihai Lefter's avatar
Mihai Lefter committed
204
205
206
207
    \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.
Laros's avatar
Laros committed
208
    \item \ldots
Laros's avatar
Laros committed
209
  \end{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
210
  
Laros's avatar
Laros committed
211
212
  Eventually leading to:
  \begin{itemize}
Laros's avatar
Laros committed
213
214
    \item I'm too busy rewriting the code I accidentally deleted.
  \end{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
215
216
217
  \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}
Laros's avatar
Laros committed
218
\end{pframe}
Laros's avatar
Laros committed
219
220

\section{Git}
Laros's avatar
Laros committed
221
222
\subsection{The name}
\begin{pframe}
Laros's avatar
Laros committed
223
224
225
226
227
228
229
230
  \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
Laros's avatar
Laros committed
231
\end{pframe}
Laros's avatar
Laros committed
232

Laros's avatar
Laros committed
233
234
\subsection{History}
\begin{pframe}
Laros's avatar
Laros committed
235
  Designed to replace the commercial package \emph{BitKeeper}.
Laros's avatar
Laros committed
236
237
238
239
240
241
242
243
244
  \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}
Laros's avatar
Laros committed
245
246
247
248
249
250
  % 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.
Laros's avatar
Laros committed
251
\end{pframe}
Laros's avatar
Laros committed
252
253

\section{Remotes}
Mihai Lefter's avatar
Mihai Lefter committed
254
\subsection{Web-based}
Laros's avatar
Laros committed
255
\begin{pframe}
Mihai Lefter's avatar
Mihai Lefter committed
256
257
258
 \begin{center}
   \includegraphics[width=\textwidth]{images/central_remotes.pdf}
 \end{center}
Laros's avatar
Laros committed
259
260
261
\end{pframe}

\begin{pframe}
Mihai Lefter's avatar
Mihai Lefter committed
262
263
264
 \begin{center}
   \includegraphics[width=\textwidth]{images/central_remotes_01.pdf}
 \end{center}
Laros's avatar
Laros committed
265
\end{pframe}
Laros's avatar
Laros committed
266

Laros's avatar
Laros committed
267
\begin{pframe}
Mihai Lefter's avatar
Mihai Lefter committed
268
  GitHub:
Laros's avatar
Laros committed
269
  \begin{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
270
271
    \item Free for public repositories. Paid for private ones.
    \item Hosting provided for free.
Laros's avatar
Laros committed
272
  \end{itemize}
Mihai Lefter's avatar
Mihai Lefter committed
273
  \bigskip
Laros's avatar
Laros committed
274

Mihai Lefter's avatar
Mihai Lefter committed
275
276
277
278
279
280
  GitLab:
  \begin{itemize}
    \item Self hosting - own installation.
    \item No hosting provided.
    \item Basic features for free. Paid advanced ones.
  \end{itemize}
Laros's avatar
Laros committed
281
\end{pframe}
Laros's avatar
Laros committed
282

Laros's avatar
Laros committed
283
284
285
286
287
\makeAcknowledgementsSlide{
  \begin{tabular}{l}
    \acknowledgements
  \end{tabular}
  \bigskip
288

Laros's avatar
Laros committed
289
  \hfill\includegraphics[width=3.5cm]{git_logo}
Laros's avatar
Laros committed
290

Laros's avatar
Laros committed
291
292
293
294
  \begin{tabular}{l}
    \small\url{https://git.lumc.nl/humgen/gitcourse}
  \end{tabular}
}
295

296
\end{document}