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}
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}
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}

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}
80
\end{pframe}
81

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}
100
\end{pframe}
101

102 103
\subsection{Local repository}
\begin{pframe}
104 105 106 107
  \begin{figure}[]
    \begin{center}
      \colorbox{white}{
        \hspace{0.5cm}
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}
114
\end{pframe}
115

116 117
\subsection{Central repository}
\begin{pframe}
118 119 120 121
  \begin{figure}[]
    \begin{center}
      \colorbox{white}{
        \hspace{0.5cm}
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}
128
\end{pframe}
129

130 131
\subsection{Distributed repositories}
\begin{pframe}
132 133 134 135
  \begin{figure}[]
    \begin{center}
      \colorbox{white}{
        \hspace{0.5cm}
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}
142
\end{pframe}
143 144

\section{Git}
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
155
\end{pframe}
156

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}
169
\end{pframe}
170 171

\section{Remotes}
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/}
194
\end{pframe}
195 196

\section{Practical}
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/}
213
\end{pframe}
214

215 216
\section{Questions?}
\lastpagetemplate
217
\begin{pframe}
218 219 220 221 222 223 224
  \begin{center}
    Acknowledgements:
    \bigskip
    \bigskip

    Martijn Vermaat

225
    Wibowo Arindrarto
226

227
    Zuotian Tatum
228
  \end{center}
229 230 231

  \vfill
  \permfoot{https://humgenprojects.lumc.nl/trac/humgenprojects/wiki/git}
232
\end{pframe}
233
\end{document}