-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
474 lines (442 loc) · 15.4 KB
/
index.html
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
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CTS-NL Git Tutorial</title>
<meta name="description" content="A tutorial on the Git distributed version control system.">
<meta name="author" content="Tim Oram">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/css/reveal.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ?
'//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/css/print/pdf.css' :
'//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
<![endif]-->
<!-- Grid system -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/unsemantic/0/unsemantic-grid-base.css" />
<link rel="stylesheet" href="custom.css" />
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Git Version Control</h1>
<h3></h3>
<p>
<small>
Presented by <a href="http://mitmaro.ca">Tim Oram</a>
</small>
</p>
<p>
<small>
Created in cooperation with the <a href="ctsnl.ca">Computer Technology Society of NL</a>
</small>
</p>
<aside class="notes">
Presentation on the Git version control system
</aside>
</section>
<section>
<p>Why you should use a VCS?</p>
<p class="fragment">What and why Git?</p>
<p class="fragment">The basics of using Git?</p>
</section>
<section>
<section>
<h2>What is version control system?</h2>
<aside class="notes">
For anyone familiar with VCS this may be a bit boring.
</aside>
</section>
<section>
<h2>Software development workflow</h2>
<p class="fragment">Create</p>
<p class="fragment">Edit</p>
<p class="fragment">Save</p>
<p class="fragment">Repeat</p>
<aside class="notes">
A typical work flow of a software developer.
</aside>
</section>
<section>
<h2>You may want to know...</h2>
<p></p>
<p class="fragment">Why you made a change?</p>
<p class="fragment">When you made the change?</p>
<p class="fragment">What changes were made?</p>
<p></p>
<h3 class="fragment">...at any time in the future.</h3>
</section>
<section>
<h2>Multiple developers?</h2>
<p class="fragment">Who made the change?</p>
<aside class="notes">
We add the question who made the change.
</aside>
</section>
</section>
<section>
<section>
<h2>Early Version Control</h2>
<p>
<img data-src="img/tarball-1.png" alt="Tar ball CVS" />
</p>
<aside class="notes">
The first 10 years of the Linux kernel used tarballs.
</aside>
</section>
<section>
<p>You get the <b>when</b>,<span class="fragment"> the <b>what</b>,</span></p>
<p class="fragment">but not the <b>why</b></p>
<p class="fragment">and tarballs are <b>difficult</b>.</p>
<aside class="notes">
<p>When from the file name.</p>
<p>What from a diff of the contents of the tarballs.</p>
<p>Tar create command can be clumsy.</p>
<p>Diff on two tar balls is painful.</p>
</aside>
</section>
<section>
<h2>Multiple Developers</h2>
<p>
<img data-src="img/tarball-2.png" alt="Tar ball CVS with multiple developers" />
</p>
</section>
<section>
<p>You get the who, </p>
<p class="fragment">but it is very messy</p>
<div class="fragment">
<p>and which version is newer?</p>
<img data-src="img/tarball-3.png" alt="Tar ball mess" />
</div>
</section>
</section>
<section>
<section>
<h2>History of Git</h2>
<p class="fragment">Developed by Linus Torvalds in 2005</p>
<p class="fragment">for the linux kernel because</p>
<p class="fragment">the previous tool they used was no longer available</p>
<p class="fragment">and everything else sucked.</p>
</section>
<section>
<h2>Why did the others suck?</h2>
<p class="fragment">They were either slow, <span class="fragment">complicated</span></p>
<p class="fragment">did not handle large projects well, </p>
<p class="fragment">or were not distributed.</p>
</section>
<section>
<h2>Why use Git?</h2>
<p class="fragment">Git is fast!</p>
<p class="fragment">Has one of the best branching systems.</p>
<p class="fragment">Fully distributed, no central server.</p>
<p class="fragment">Local, no network connection required.</p>
</section>
</section>
<!-- start: might leave this bit out -->
<section>
<section>
<h2>Centralized System</h2>
<div class="grid-container grid-parent image-info">
<ul class="grid-50 image-info">
<li class="fragment">Commit to server</li>
<li class="fragment">Pull from server</li>
<li class="fragment">History saved on server</li>
</ul>
<img class="grid-50" data-src="img/svn-server.png" alt="Subversion server based system" />
</div>
</section>
<section>
<h2>Centralized System</h2>
<p>Server is required for most operations</p>
<p class="fragment">Server connection lost?</p>
<p class="fragment">No version control</p>
</section>
</section>
<section>
<section>
<h2>Distributed System</h2>
<img data-src="img/git-server.png" alt="Git based system" />
</section>
<section>
<h2>Distributed System</h2>
<p>Every developer has their own copy</p>
<p class="fragment">with their own history</p>
<p class="fragment">to which they can push and pull to others.</p>
</section>
<section>
<h2>Distributed System</h2>
<p>Seems confusing, right?</p>
<p class="fragment">GitHub can act like a central server</p>
</section>
</section>
<!-- end: might leave this bit out -->
<section>
<section>
<h2>The main states</h2>
<aside class="notes">
Don't worry if this doesn't make complete sense. It's a high level look.
</aside>
</section>
<section>
<h2>The main states</h2>
<p>Repository</p>
<p class="fragment">Staging area</p>
<p class="fragment">Working directory</p>
</section>
<section>
<h2>Repository</h2>
<p class="fragment">The .git directory</p>
<p class="fragment">Where your history is stored</p>
<p class="fragment">Where you commit files</p>
</section>
<section>
<h2>Staging area</h2>
<p class="fragment">Where you construct your commit</p>
<p class="fragment">Layer between you and the repository</p>
</section>
<section>
<h2>Working directory</h2>
<p class="fragment">Current copy of the repository</p>
<p class="fragment">Actual files and directories</p>
<p class="fragment">What you use and modify</p>
</section>
<section>
<h2>Basic workflow</h2>
<p class="fragment">Modify files in the working directory</p>
<p class="fragment">Add files to the staging area</p>
<p class="fragment">Commit the staging area to the repository</p>
<p class="fragment">Checkout files from the repository to the working directory</p>
</section>
<section>
<h2>Basic workflow</h2>
<img data-src="img/git-states.png" alt="Git States" />
</section>
</section>
<section>
<section>
<h2>Git Basics</h2>
</section>
<section>
<h2>Getting a repository</h2>
</section>
<section>
<h3>git init</h3>
<img data-src="img/git-init-current.png" alt="git int current directory" />
<p>
Initialize in the current directory
</p>
<img data-src="img/git-init.png" alt="git int" />
<p>
or under the directory provided.
</p>
</section>
<section>
<h3>git clone <repository></h3>
<img data-src="img/git-clone-default.png" alt="git clone" />
<p>
Clone in a remote repository.
</p>
</section>
<section>
<h2>Status checking</h2>
</section>
<section>
<h3>git status</h3>
<img data-src="img/git-status.png" alt="git status" />
<p>Shows the state of the repository</p>
</section>
<section>
<h3>Staging area</h3>
<img data-src="img/git-status-stage.png" alt="git status" />
</section>
<section>
<h3>Modified files</h3>
<img data-src="img/git-status-mod.png" alt="git status" />
</section>
<section>
<h3>Untracked files</h3>
<img data-src="img/git-status-untracked.png" alt="git status" />
</section>
<section>
<h3>Unmodified files</h3>
<p>Files Git is tracking but have not been modified</p>
<p class="fragment">Not shown by git status</p>
</section>
<section>
<h3>Status workflow</h3>
<img data-src="img/git-status-workflow.png" alt="git status" />
</section>
<section>
<h2>Tracking new files</h2>
<img data-src="img/git-add-new-before.png" alt="git add" />
</section>
<section>
<div>
<p>Add a single file</p>
<img data-src="img/git-add-new-one-file.png" alt="git add file" />
</div>
<div class="fragment">
<p>Recursively add folders</p>
<img data-src="img/git-add-new-recursive.png" alt="git add recursive" />
</div>
<div class="fragment">
<p>Combined</p>
<img data-src="img/git-add-new-combined.png" alt="git add combined" />
</div>
</section>
<section>
<img data-src="img/git-add-new-after.png" alt="git add status" />
</section>
<section>
<h2>Committing</h2>
<img data-src="img/git-add-new-after.png" alt="git before commit status" />
</section>
<section>
<h3>A basic commit</h3>
<p><img data-src="img/git-commit.png" alt="git commit" /></p>
<p><img class="fragment" data-src="img/git-commit-end.png" alt="git commit result" /></p>
<aside class="notes">
Commit the contents of your stage to the repository.
</aside>
</section>
<section>
<h2>Deleting tracked files</h2>
</section>
<section>
<div>
<p>Remove a single file</p>
<p><img data-src="img/git-rm.png" alt="git remove" /></p>
</div>
<div class="fragment">
<p>Remove a directory and all the files contained</p>
<p><img data-src="img/git-rm-recursive.png" alt="git remove recursive" /></p>
</div>
<aside class="notes">
Also removes the file or folder form the file system.
</aside>
</section>
<section>
<p>The status</p>
<img data-src="img/git-rm-status.png" alt="git remove status" />
</section>
<section>
<h2>Unstaging</h2>
</section>
<section>
<p>Remove file from stage</p>
<img data-src="img/git-reset-head-file.png" alt="git reset head file" />
<div class="fragment">
<p>Remove folder from stage</p>
<img data-src="img/git-reset-head-recursive.png" alt="git reset head recursive" />
</div>
</section>
<section>
<p>The status</p>
<img data-src="img/git-reset-head-status.png" alt="git reset status" />
</section>
<section>
<h2>Undoing changes</h2>
</section>
<section>
<p>Checkout a single file</p>
<img data-src="img/git-checkout-file.png" alt="git checkout file" />
<div class="fragment">
<p>Check out a folder</p>
<img data-src="img/git-checkout-recursive.png" alt="git checkout recursive" />
</div>
<div class="fragment">
<p>Status</p>
<img data-src="img/git-checkout-status.png" alt="git checkout status" />
</div>
<aside class="notes">
Does not only work on removed files, also changed files.
</aside>
</section>
</section>
<section>
<section>
<h2>Teamwork</h2>
</section>
<section>
<h2>Remotes</h2>
<p class="fragment">Hosted on a network</p>
<p class="fragment">You can have one or many</p>
<p class="fragment">Collaborate with others by pushing and pulling data</p>
<aside class="notes">
Including the Internet
</aside>
</section>
<section>
<h2>Working with Remotes</h2>
</section>
<section>
<div>
<p>Add a remote</p>
<img data-src="img/git-remote-add.png" alt="git remote add" />
</div>
<div class="fragment">
<p>List remotes</p>
<img data-src="img/git-remote-list.png" alt="git remote list" />
</div>
</section>
<section>
<div>
<p>Remove remotes</p>
<img data-src="img/git-remote-remove.png" alt="git remote remove" />
</div>
<div class="fragment">
<img data-src="img/git-remote-list.png" alt="git remote list" />
</div>
</section>
<section>
<div>
<p>Push to a remote</p>
<img data-src="img/git-push.png" alt="git push" />
</div>
<div class="fragment">
<p>Pull from a remote</p>
<img data-src="img/git-pull.png" alt="git pull" />
</div>
</section>
</section>
</div>
</div>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/headjs/1.0.3/head.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/js/reveal.min.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'convex', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: '//cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js', condition: function() { return !document.body.classList; } },
{ src: '//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '//cdnjs.cloudflare.com/ajax/libs/reveal.js/3.0.0/plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>