-
Notifications
You must be signed in to change notification settings - Fork 0
/
talk.tex
302 lines (264 loc) · 7.95 KB
/
talk.tex
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
34
35
36
37
38
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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
\documentclass[english]{slides}
\usepackage[english]{common}
\renewcommand{\maketitle}{%
\nocount{%
\frame[plain]{\titlepage}
}
}
\title{The GIT parable}
\subtitle{Why \texttt{Untitled4copy.v112\_for\_Tom.txt} is NOT fine}
\author{Maxime Rio}
\date{26th November 2015}
\begin{document}
\maketitle
\begin{frame}{Where it is coming from}
\begin{itemize}
\item originate from Tom Preston-Werner's article
\footnote{\url{http://tom.preston-werner.com/2009/05/19/the-git-parable.html}}
\item describe how to build yourself -- from scratch --\\
a \alert{version control system} (VCS)
\item i.e. introduce internals of GIT!
\item skipped parts: history rewriting and file storage
\end{itemize}
\end{frame}
\begin{frame}{A bunch of text files in a folder}
\framesubtitle{is the start of an \alert{awesome} project}
\twocolumns{%
\begin{block}{You have}
\begin{itemize}
\item<1-> 1 project (= 1 folder)
\item<2-> a collection of text files (scripts, notes...)
\end{itemize}
\end{block}
\onslide<3->{%
\begin{block}{\alert{You want to}}
\begin{itemize}
\item backup work periodically
\item keep track of changes
\item share your work and keep things synced
\end{itemize}
\end{block}%
}
}{%
\only<1>{\fig[width=\textwidth]{figs/content_folder.png}}%
\only<2-3>{\fig[width=\textwidth]{figs/content_files.png}}%
\only<4->{%
\begin{block}{All you need is}
\begin{itemize}
\item a text editor
\item a file browser (or a terminal ;-)
\end{itemize}
\end{block}%
}%
}
\end{frame}
\begin{frame}{Keep copies of modified files}
\twocolumns{%
\begin{itemize}
\item<+-> keep a backup before modifying a file
\item<+-> and do it again
\item<+-> and which versions work together?
\item<+-> \alert{\Large bad bad bad idea}
\end{itemize}
}{%
\only<1>{\fig[width=\textwidth]{figs/backup_warr.png}}%
\only<2>{\fig[width=\textwidth]{figs/backup_warr2.png}}%
\only<3>{\fig[width=\textwidth]{figs/backup_conflict.png}}%
\only<4->{\fig[width=\textwidth]{figs/backup_bad.png}}%
}
\end{frame}
\begin{frame}{Keep copies of the folder: snapshots}
\twocolumns{%
\begin{itemize}
\item<+-> \emph{working} folder keeps the working copy
\item<+-> copy the whole folder when done
\item<+-> add a message file...
\item<+-> ...with date, author and changes introduced
\end{itemize}
\onslide<5->{%
\begin{block}{benefits}
\begin{itemize}
\item keep things synced in backup folders
\item linear view of project history
\end{itemize}
\end{block}%
}
}{%
\only<1>{\fig[width=\textwidth]{figs/snapshots_working.png}}%
\only<2>{\fig[width=\textwidth]{figs/snapshots_backup.png}}%
\only<3>{\fig[width=\textwidth]{figs/snapshots_files.png}}%
\only<4>{\fig[width=\textwidth]{figs/snapshots_message.png}}%
\only<5>{\fig[width=\textwidth]{figs/snapshots_history.png}}%
}
\end{frame}
\begin{frame}{Fix old versions: branches}
\twocolumns{%
\onslide<2->{%
\begin{itemize}
\item<2-> copy old backup to \emph{working}
\item<3-> fix problem
\item<4-> backup with a message
\item<5-> add original backup folder name in the message
\end{itemize}%
}
\onslide<6>{%
\begin{block}{what happened?}
\begin{itemize}
\item just made a \alert{branch}
\item from linear history to \alert{tree}
\end{itemize}
\end{block}%
}
}{%
\only<1>{\fig[width=\textwidth]{figs/fixold_bug.png}}%
\only<2>{\fig[width=\textwidth]{figs/fixold_copy.png}}%
\only<3>{\fig[width=\textwidth]{figs/fixold_fixed.png}}%
\only<4>{\fig[width=\textwidth]{figs/fixold_snap.png}}%
\only<5>{\fig[width=\textwidth]{figs/fixold_message.png}}%
\only<6>{\fig[width=\textwidth]{figs/fixold_tree.png}}%
}
\end{frame}
\begin{frame}{Keep track of branches}
\twocolumns{%
\vspace{2em}
\begin{itemize}
\item<2-> different branches for different purpose
(fixes, new feature, releases...)
\item<3-> add \emph{branches} file for tracking
\item<4-> name of last snapshot for each branch
\end{itemize}%
}{%
\only<1>{\fig[width=\textwidth]{figs/branches_folders.png}}%
\only<2-3>{\fig[width=\textwidth]{figs/branches_tree.png}}%
\only<4->{\fig[width=\textwidth]{figs/branches_message.png}}%
}
\end{frame}
\begin{frame}{Record specific events: tags}
\twocolumns{%
\vspace{2em}
\begin{itemize}
\item name specific snapshots
\begin{itemize}
\item version 1
\item journal-submission
\item ...
\end{itemize}
\item add \emph{tags} file for tracking
\item<2> relates snapshot name to tag name
\end{itemize}%
}{%
\only<1>{\fig[width=\textwidth]{figs/tags_folders.png}}%
\only<2>{\fig[width=\textwidth]{figs/tags_message.png}}%
}
\end{frame}
\begin{frame}{Share your work with someone else}
\twocolumns{%
\vspace{2em}
\begin{itemize}
\item<2-> send a copy of everything to your partner!
\item<3-> partner adding new snapshots and you too...
\item<4-> numbering broken when put back together
\end{itemize}
}{%
\vspace{-1em}
\only<1>{\fig[width=\textwidth]{figs/share.png}}%
\only<2>{\fig[width=\textwidth]{figs/share_copy.png}}%
\only<3>{\fig[width=\textwidth]{figs/share_news.png}}%
\only<4>{\fig[width=\textwidth]{figs/share_conflict.png}}%
}
\end{frame}
\begin{frame}{Putting things back together: hash names}
\twocolumns{%
\vspace{2em}
\begin{itemize}
\item<+-> hash of a file = ``unique'' string depending on file content
\item<+-> replace snapshot names with hash of message files
\item<+-> message files are unique = hash names are unique
\item<+-> no conflict anymore
\end{itemize}
}{%
\vspace{-1em}
\only<1>{\fig[width=\textwidth]{figs/hash_message.png}}%
\only<2>{\fig[width=\textwidth]{figs/hash_rename.png}}%
\only<3>{\fig[width=\textwidth]{figs/hash_news.png}}%
\only<4>{\fig[width=\textwidth]{figs/hash_merge.png}}%
}
\end{frame}
\begin{frame}{Putting things back together: merging}
\twocolumns{%
\vspace{2em}
\begin{itemize}
\item<+-> concurrent changes in 2 snapshots
\item<+-> select relevant changes from each
\item<+-> special message with two parent snapshots
\item<+-> that's it
\end{itemize}
}{%
\vspace{-1em}
\only<1>{\fig[width=\textwidth]{figs/merge_state.png}}%
\only<2>{\fig[width=\textwidth]{figs/merge_folders.png}}%
\only<3->{\fig[width=\textwidth]{figs/merge_message.png}}%
}
\end{frame}
\begin{frame}{Prepare a snapshot: staging area}
\twocolumns{%
\vspace{2em}
\begin{itemize}
\item<+-> new folder to prepare snapshots
\item<+-> copy there only what's needed for next snapshot
\item<+-> backup from \emph{staging}
\end{itemize}
\onslide<4>{%
\begin{block}{benefits}
\begin{itemize}
\item split work done in logical chunks
\end{itemize}
\end{block}%
}
}{%
\vspace{-1em}
\only<1>{\fig[width=\textwidth]{figs/staging.png}}%
\only<2>{\fig[width=\textwidth]{figs/staging_add.png}}%
\only<3->{\fig[width=\textwidth]{figs/staging_snap.png}}%
}
\end{frame}
\begin{frame}{Comparing snapshots: diffs}
Quickly check changes between \emph{working} and \emph{staging}, between
snapshots...
\fig[width=0.9\textwidth]{figs/diff.png}
\end{frame}
\begin{frame}{Smart storage/access: GIT}
\twocolumns[0.55]{%
\begin{itemize}
\item GIT does all this in \emph{.git} folder
\item<+-> with compression
\item<+-> using dedicated commands%
\begin{itemize}
\item git clone, git init
\item git add, git commit
\item git pull, git push
\item git merge
\item git diff
\item git log
\end{itemize}
\item<+-> or a GUI, e.g \emph{SmartGit}
\end{itemize}
}{%
\fig[width=\textwidth]{figs/git_folder.png}%
}
\end{frame}
\begin{frame}{Collaborative plateforms }
\framesubtitle{Bitbucket, Github, Gitlab...}
\begin{itemize}
\item another collaborator: a central server
\item central node to sync everyone
\item provides other tools: wiki, ticket systems...
\item usage is not part of this talk ;-)
\end{itemize}
\end{frame}
\begin{frame}
\begin{center}\huge
Questions?
\end{center}
\end{frame}
\end{document}