f43035510ca533f90b682298e672859fe79573ad
[ai-gitflashtalk.git] / git.tex
1 %&preamble
2 \begin{document}
3
4 \frame{\titlepage}
5
6 \begin{frame}
7 \frametitle{Table of contents}
8 \tableofcontents
9 \end{frame}
10
11 \section{Introduction}
12 \begin{frame}
13 \frametitle{Who am I?}
14 \begin{itemize}
15 \item Mart Lubbers
16 \item 4th year bachelor AI
17 \item \url{https://github.com/dopefishh/gitflashtalk}
18 \item SHA of the commit of this presentation: {\tiny\GITAbrHash}
19 \end{itemize}
20 \end{frame}
21
22 \begin{frame}
23 \frametitle{Where did GIT come from?}
24 \begin{block}{History}
25 \begin{columns} \column{0.4\linewidth}
26 \begin{itemize}
27 \item Pronounce: \textipa{[g \'i t]}
28 \item Linus Thorvalds
29 \item Linux kernel
30 \end{itemize}
31
32 \column{0.5\linewidth}
33 \begin{figure}[H]
34 \centering
35 \includegraphics[width=0.5\linewidth]{1.png}
36 \caption{Linus Torvalds}
37 \end{figure}
38 \end{columns}
39 \end{block}
40
41 \begin{block}{What is GIT?}
42 \begin{itemize}
43 \item Version control
44 \end{itemize}
45 \end{block}
46 \end{frame}
47
48 \begin{frame}
49 \frametitle{Why GIT?}
50 \begin{block}{Pros}
51 \begin{itemize}
52 \item Fast
53 \item Scaleable
54 \item Simple
55 \item Support for non linear development
56 \item Intermediate stage between committing and pushing
57 \end{itemize}
58 \end{block}
59
60 \begin{block}{Cons}
61 \begin{itemize}
62 \item Binary files
63 \item Intermediate stage between committing and pushing
64 \end{itemize}
65 \end{block}
66 \end{frame}
67
68 \section{Basics}
69 \subsection{Installation}
70 \begin{frame}[fragile]
71 \begin{block}{{\Large\Smiley\Smiley} Linux}
72 Depending on the distribution you may have to do:\\
73 \lstinline{# apt-get install git}\\
74 \lstinline{# pacman -S git}\\
75 \lstinline{# yum install git}\\
76 \lstinline{# emerge --ask dev-vcs/git}\\
77 Etc...
78 \end{block}
79
80 \begin{block}{{\Large\Frowny\Smiley} Mac}
81 Install via XCode tools. Just run \lstinline{\$ git} and
82 when GIT is not installed it will prompt you with instructions.
83 \end{block}
84
85 \begin{block}{{\Large\Frowny\Frowny} Windows}
86 Downoad the binary from \url{http://git-scm.com/download/win} and install.
87 \end{block}
88
89 \end{frame}
90
91 \subsection{Getting started}
92 \begin{frame}[fragile]
93 \frametitle{Getting started}
94 \begin{block}{Check GIT version in (git)bash}
95 \begin{lstlisting}
96 frobnicator@frobmachine:~\$ git --version
97 git version 1.7.10.4
98 \end{lstlisting}
99 \end{block}
100
101 \begin{block}{Create a repository}
102 \begin{lstlisting}
103 frobnicator@frobmachine:~/projects\$ git init myfirstproject
104 Initialized empty Git repository in /home/frobnicator/projects/myfirstproject/.git/
105 frobnicator@frobmachine:~/projects\$ ls -1 myfirstproject/.git
106 branches/
107 config
108 description
109 HEAD
110 hooks/
111 info/
112 objects/
113 refs/
114 \end{lstlisting}
115 \end{block}
116 \end{frame}
117
118 \subsection{Four(five) stages}
119 \begin{frame}
120 \frametitle{Four(five) stages}
121 \begin{itemize}
122 \item (Stash)
123 \item Workspace
124 \item Index
125 \item Local repo
126 \item Upstream repo
127 \end{itemize}
128 \end{frame}
129
130 \begin{frame}
131 \frametitle{Workflow}
132 \begin{figure}[H]
133 \centering
134 \includegraphics[scale=0.4]{2.png}
135 \caption{Git workflow}
136 \end{figure}
137 \end{frame}
138
139 \section{Branching}
140
141 \end{document}