introduction.tex 5.48 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
\documentclass[slidestop]{beamer}

\title{Introduction to Version Control}
\providecommand{\myConference}{Git course}
\providecommand{\myDate}{Monday, October 14, 2013}
\author{Jeroen F. J. Laros}
\providecommand{\myGroup}{Leiden Genome Technology Center}
\providecommand{\myDepartment}{Department of Human Genetics}
\providecommand{\myCenter}{Center for Human and Clinical Genetics}
\providecommand{\lastCenterLogo}{
  \raisebox{-0.1cm}{
    \includegraphics[height=1cm]{lgtc_logo}
    %\includegraphics[height=0.7cm]{ngi_logo}
  }
}
\providecommand{\lastRightLogo}{
  %\includegraphics[height=0.7cm]{nbic_logo}
  %\includegraphics[height=0.8cm]{nwo_logo_en}
  %\hspace{1.5cm}\includegraphics[height=0.7cm]{gen2phen_logo}
}

\usetheme{lumc}

\begin{document}

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

% Make the title page.
\bodytemplate

% First page of the presentation.
\section{Introduction}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
34 35
\subsection{Version control}
\begin{pframe}
36 37 38
  \emph{The management of changes to documents, computer programs, large web
  sites, and other collections of information.} --- Wikipedia.
  \bigskip
39
  \pause
40

41 42 43 44 45 46 47 48 49
  General features:
  \begin{itemize}
    \item Keeping track of your files in an orderly manner.
    \begin{itemize}
      \item Hiding old versions.
      \item Recording who made changes and when.
    \end{itemize}
    \item Enables collaboration.
  \end{itemize}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
50
\end{pframe}
51

52 53 54 55 56 57 58 59 60
\begin{pframe}
  \begin{figure}[]
    \begin{center}
      \includegraphics[height=0.85\textheight]{project_tree}
    \end{center}
    \caption{``I have my own system.''}
  \end{figure}
\end{pframe}

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
61 62
\subsection{Why should I use it?}
\begin{pframe}
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
  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}
  \bigskip
  \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.
78
    \item See who made which changes at which time.
79
  \end{itemize}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
80
\end{pframe}
81

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
82 83
\subsection{Why should I not use it?}
\begin{pframe}
84 85 86 87 88 89 90 91
  A list of common excuses:
  \begin{itemize}
    \item It is too much work.
    \item I have my own system.
    \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
92 93 94 95 96 97
  \end{itemize}
  \bigskip
  \pause

  Eventually leading to:
  \begin{itemize}
98 99
    \item I'm too busy rewriting the code I accidentally deleted.
  \end{itemize}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
100
\end{pframe}
101

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
102 103
\subsection{Local repository}
\begin{pframe}
104 105 106 107
  \begin{figure}[]
    \begin{center}
      \colorbox{white}{
        \hspace{0.5cm}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
108
        \includegraphics[height=0.8\textheight]{18333fig0101-tn}
109 110 111 112 113
        \hspace{0.5cm}
      }
    \end{center}
    \caption{Local version control diagram.}
  \end{figure}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
114
\end{pframe}
115

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
116 117
\subsection{Central repository}
\begin{pframe}
118 119 120 121
  \begin{figure}[]
    \begin{center}
      \colorbox{white}{
        \hspace{0.5cm}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
122
        \includegraphics[height=0.8\textheight]{18333fig0102-tn}
123 124 125 126 127
        \hspace{0.5cm}
      }
    \end{center}
    \caption{Centralised version control diagram.}
  \end{figure}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
128
\end{pframe}
129

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
130 131
\subsection{Distributed repositories}
\begin{pframe}
132 133 134 135
  \begin{figure}[]
    \begin{center}
      \colorbox{white}{
        \hspace{0.5cm}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
136
        \includegraphics[height=0.8\textheight]{18333fig0103-tn}
137 138 139 140 141
        \hspace{0.5cm}
      }
    \end{center}
    \caption{Distributed version control diagram.}
  \end{figure}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
142
\end{pframe}
143 144

\section{Git}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
145 146
\subsection{The name}
\begin{pframe}
147 148 149 150 151 152 153 154
  \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
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
155
\end{pframe}
156

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
157 158
\subsection{History}
\begin{pframe}
159
  Designed to replace the commercial package \emph{BitKeeper}.
160 161 162 163 164 165 166 167 168
  \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}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
169
\end{pframe}
170 171

\section{Remotes}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
172 173
\subsection{A lot of choices}
\begin{pframe}
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
  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
  \permfoot{https://github.com/}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
194
\end{pframe}
195 196

\section{Practical}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
197 198
\subsection{Outline}
\begin{pframe}
199 200 201
  We are going to:
  \begin{itemize}
    \item Create and configure a user account on the GitLab server.
202
    \item Upload an \bt{ssh-key} to work with Git.
203
  \end{itemize}
204 205 206 207 208 209
  \bigskip

  Or alternatively, if you can not access the internal network:
  \begin{itemize}
    \item Use \bt{https} to work with GitLab.
  \end{itemize}
210 211 212

  \vfill
  \permfoot{https://git.lumc.nl/}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
213
\end{pframe}
214

215 216
\section{Questions?}
\lastpagetemplate
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
217
\begin{pframe}
218 219 220 221 222 223 224
  \begin{center}
    Acknowledgements:
    \bigskip
    \bigskip

    Martijn Vermaat

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
225
    Wibowo Arindrarto
226

Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
227
    Zuotian Tatum
228
  \end{center}
229 230 231

  \vfill
  \permfoot{https://humgenprojects.lumc.nl/trac/humgenprojects/wiki/git}
Jeroen F.J. Laros's avatar
Jeroen F.J. Laros committed
232
\end{pframe}
233
\end{document}