-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
380 lines (324 loc) · 15.2 KB
/
index.html
File metadata and controls
380 lines (324 loc) · 15.2 KB
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Code versioning with Git</title>
<meta name="description" content="An introduction to code versioning with Git">
<meta name="author" content="Paul-Emmanuel Raoul">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css" id="theme">
<link rel="stylesheet" href="plugin/highlight/zenburn.css">
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Code versioning</h1>
<h3>An introduction with Git</h3>
<p>
<small>By <a href="http://blog.skyplabs.net">Paul-Emmanuel Raoul</a> / <a href="mailto:skyper@skyplabs.net">skyper@skyplabs.net</a> / <a href="https://twitter.com/SkypLabs">@SkypLabs</a></small>
</p>
<p style="margin-top: .5em">
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a>
</p>
</section>
<section>
<h2>What is version control?</h2>
<p class="fragment">System that records changes made to a set of files over time</p>
<p class="fragment">These systems are called VCS (Version Control Systems)</p>
<p class="fragment">They are essential to programming projects involving several people</p>
</section>
<section>
<h2>What can we do with that?</h2>
<p class="fragment">Keep every version of a file (source code, image...)</p>
<p class="fragment">Work easily with several programmers</p>
<p class="fragment">Revert files back to a previous state</p>
<p class="fragment">Compare changes over time</p>
<p class="fragment">And much more...</p>
</section>
<section>
<section>
<h2>Different VCS architectures</h2>
<p>Local</p>
<p>Centralised</p>
<p>Distributed</p>
</section>
<section>
<h2>Local VCS</h2>
<p class="fragment">Simple local database</p>
<p class="fragment">No connectivity</p>
<p class="fragment">No collaboration</p>
<p class="fragment">Example: <a href="https://www.gnu.org/software/rcs/">RCS</a></p>
</section>
<section>
<h2>Local VCS</h2>
<figure>
<img src="img/local.png" alt="Local VCS" style="width: 500px">
<figcaption style="font-style: italic; font-size: .5em">Local VCS - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Centralised VCS</h2>
<p class="fragment">Made for dealing with the collaboration issue</p>
<p class="fragment">One single remote server</p>
<p class="fragment">Requires to know what other people are doing</p>
<p class="fragment">Examples: <a href="https://savannah.nongnu.org/projects/cvs">CVS</a>, <a href="https://subversion.apache.org/">Subversion</a></p>
</section>
<section>
<h2>Centralised VCS</h2>
<figure>
<img src="img/centralised.png" alt="Centralised VCS" style="width: 600px">
<figcaption style="font-style: italic; font-size: .5em">Centralised VCS - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Distributed VCS</h2>
<p class="fragment">Full local copy of the remote repository</p>
<p class="fragment">Can deal with several remote repositories</p>
<p class="fragment">Several types of workflows</p>
<p class="fragment">Examples: <a href="http://www.git-scm.com">Git</a>, <a href="https://www.mercurial-scm.org/">Mercurial</a></p>
</section>
<section>
<h2>Distributed VCS</h2>
<figure>
<img src="img/distributed.png" alt="Distributed VCS" style="width: 400px">
<figcaption style="font-style: italic; font-size: .5em">Distributed VCS - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
</section>
<section>
<h2>Why using Git?</h2>
<p class="fragment">It's fast</p>
<p class="fragment">Strong support of non-linear workflows</p>
<p class="fragment">Ables to handle large projects efficiently</p>
<p class="fragment">Most used VCS these days</p>
<p class="fragment">Free and open source</p>
</section>
<section>
<section>
<h2>Git basics</h2>
<p>To initialise a Git repository in an existing directory:</p>
<pre><code data-trim>
git init
</code></pre>
<p>And to create a new one:</p>
<pre><code data-trim>
git init my-project
</code></pre>
</section>
<section>
<h2>Git basics</h2>
<p>If you want a copy of an existing Git repository:</p>
<pre><code data-trim>
git clone git@github.com:docker/docker.git
</code></pre>
<p>The above command line will clone the official repository of the <a href="https://www.docker.com/">Docker</a> project</p>
</section>
<section>
<h2>Git basics</h2>
<figure>
<img src="img/areas.png" alt="Areas">
<figcaption style="font-style: italic; font-size: .5em">Areas - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Git basics</h2>
<p>To track new files:</p>
<pre><code data-trim>
git add *.c
git add include/
git add README.md
</code></pre>
<p>These files are now in the staging area</p>
</section>
<section>
<h2>Git basics</h2>
<p>And now, your first commit:</p>
<pre><code data-trim>
git commit -m "first commit"
</code></pre>
</section>
<section>
<h2>Git basics</h2>
<figure>
<img src="img/lifecycle.png" alt="Lifecycle">
<figcaption style="font-style: italic; font-size: .5em">Lifecycle - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
</section>
<section>
<section>
<h2>Git branching</h2>
<p class="fragment">Git's "killer feature"</p>
<p class="fragment">Incredibly lightweight</p>
<p class="fragment">Designed to be used as often as possible</p>
</section>
<section>
<h2>Basic branching</h2>
<figure>
<img src="img/basic-branching-1.png" alt="Basic branching 1">
<figcaption style="font-style: italic; font-size: .5em">Basic branching 1 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Basic branching</h2>
<figure>
<img src="img/basic-branching-2.png" alt="Basic branching 2">
<figcaption style="font-style: italic; font-size: .5em">Basic branching 2 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Basic branching</h2>
<figure>
<img src="img/basic-branching-3.png" alt="Basic branching 3">
<figcaption style="font-style: italic; font-size: .5em">Basic branching 3 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Basic branching</h2>
<figure>
<img src="img/basic-branching-4.png" alt="Basic branching 4">
<figcaption style="font-style: italic; font-size: .5em">Basic branching 4 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Basic branching</h2>
<figure>
<img src="img/basic-branching-5.png" alt="Basic branching 5">
<figcaption style="font-style: italic; font-size: .5em">Basic branching 5 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Basic branching</h2>
<figure>
<img src="img/basic-branching-6.png" alt="Basic branching 6">
<figcaption style="font-style: italic; font-size: .5em">Basic branching 6 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>The rebase feature</h2>
<figure>
<img src="img/interesting-rebase-1.png" alt="Interesting rebase 1">
<figcaption style="font-style: italic; font-size: .5em">Interesting rebase 1 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>The rebase feature</h2>
<figure>
<img src="img/interesting-rebase-2.png" alt="Interesting rebase 2">
<figcaption style="font-style: italic; font-size: .5em">Interesting rebase 2 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>The rebase feature</h2>
<figure>
<img src="img/interesting-rebase-3.png" alt="Interesting rebase 3">
<figcaption style="font-style: italic; font-size: .5em">Interesting rebase 3 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>The rebase feature</h2>
<figure>
<img src="img/interesting-rebase-4.png" alt="Interesting rebase 4">
<figcaption style="font-style: italic; font-size: .5em">Interesting rebase 4 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>The rebase feature</h2>
<figure>
<img src="img/interesting-rebase-5.png" alt="Interesting rebase 5">
<figcaption style="font-style: italic; font-size: .5em">Interesting rebase 5 - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
</section>
<section>
<section>
<h2>Different workflows</h2>
<p>Centralised</p>
<p>Integration manager</p>
<p>Dictator and lieutenant</p>
</section>
<section>
<h2>Centralised</h2>
<figure>
<img src="img/centralised_workflow.png" alt="Centralised workflow">
<figcaption style="font-style: italic; font-size: .5em">Centralised workflow - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Integration manager</h2>
<figure>
<img src="img/integration-manager.png" alt="Integration-manager workflow">
<figcaption style="font-style: italic; font-size: .5em">Integration-manager workflow - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
<section>
<h2>Dictator and lieutenant</h2>
<figure>
<img src="img/benevolent-dictator.png" alt="Dictator and lieutenant workflow">
<figcaption style="font-style: italic; font-size: .5em">Dictator and lieutenant workflow - Reference: <a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></figcaption>
</figure>
</section>
</section>
<section>
<section>
<h2>Where to host your Git repositories?</h2>
<p>Public clouds</p>
<p>Self-hosted servers</p>
</section>
<section>
<h2>Public clouds</h2>
<p class="fragment">Examples: <a href="https://github.com/">GitHub</a>, <a href="https://bitbucket.org/">Bitbucked</a></p>
<p class="fragment">Git is not GitHub!</p>
<p class="fragment">Generally free for public repositories</p>
</section>
<section>
<h2>Self-hosted servers</h2>
<p class="fragment">Examples: <a href="https://about.gitlab.com/">GitLab</a>, <a href="https://gogs.io/">Gogs</a></p>
<p class="fragment">Better choice if your work is confidential</p>
</section>
<section>
<h2>Common features</h2>
<p class="fragment">Manage privileges</p>
<p class="fragment">Pull requests / Merge requests</p>
<p class="fragment">Issues</p>
<p class="fragment">Wiki</p>
<p class="fragment">Webhooks</p>
</section>
</section>
<section>
<h2>Want to know more about Git?</h2>
<p><a href="http://git-scm.com/docs">Official documentation</a></p>
<p><a href="http://git-scm.com/book/en/v2">Pro Git, 2nd edition</a></p>
<p><a href="https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf">Cheat sheet</a></p>
<p><a href="http://git-scm.com/videos">Videos</a></p>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
// Vertical centering of slides.
center: true,
// Display presentation control arrows.
controls: true,
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide.
hash: true,
// Display a presentation progress bar.
progress: true,
// Transition style: none/fade/slide/convex/concave/zoom.
transition: 'slide',
// https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight ]
});
</script>
</body>
</html>