-
Notifications
You must be signed in to change notification settings - Fork 0
/
impress.html
500 lines (444 loc) · 16.8 KB
/
impress.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
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=1024" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Git vs. Mercurial</title>
<meta name="description" content="Git vs. Mercurial presentation" />
<meta name="author" content="Adam Parchimowicz" />
<link href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic" rel="stylesheet" />
<link href="impress.css" rel="stylesheet" />
<script src="jquery-1.9.1.min.js"></script>
<link rel="shortcut icon" href="favicon.png" />
</head>
<body>
<div id="impress" data-transition-duration="900">
<div id="start" class="step intro" data-x="-2318" data-y="-1773" data-z="1" data-scale="0.16">
<img src="apilia_large_logo.png" />
</div>
<div id="intro" class="step slide intro" data-x="-2000" data-y="-1500">
<q>Adam Parchimowicz
<ul>
<li>developer for > 7 years</li>
<li>passionate about new-tech</li>
<li>java nerd</li>
<li>fan of cheesy jokes</li>
</ul>
</q>
</div>
<div id="roundone" class="step hideable" data-x="-2000" data-y="-2500" data-rotate-x="55" data-scale="0.5">
<img src="mk.png" />
</div>
<audio id="roundoneclip" class="audioclip">
<source src="roundonefight.mp3" type="audio/mp3" />
</audio>
<audio id="fatalityclip">
<source src="fatality.mp3" type="audio/mp3" />
</audio>
<div id="factsandmyths" class="step factsmyths" data-x="-450" data-y="-2500" data-rotate="0" data-scale="1.8">
<q>Facts and <span class="rotate">myths.</span></q>
</div>
<div class="step slide factsmyths" data-x="-1000" data-y="-1500">
<q><b>Git / Mercurial</b> - two rival DVCS out there since <b>2005</b>.</q>
<q>In almost 8 years some <b>facts</b> are already <b>myths</b>.</q>
</div>
<div class="step slide factsmyths" data-x="0" data-y="-1500">
<q><i>"Git's CLI sucks!"</i> say Mercurial's power users.
<ul>
<li>hard to learn</li>
<li>harder to master</li>
<li>exposes unnecessary internal details</li>
<li>no "native" support on Windows</li>
</ul>
</q>
</div>
<div id="githasimproved" class="step slide factsmyths" data-x="0" data-y="-750" data-scale="1">
<q>Git has improved a lot since its early days.
<ul>
<li>fantastic well written free book</li>
<li>not that hard to grasp the concepts*!</li>
<li>you can use only basic commands</li>
<li>works great on Windows now</li>
</ul>
</q>
</div>
<div id="kindahard" class="step hideable factsmyths" data-x="-330" data-y="-500" data-scale="0.15">
<ul>
<li>* still kinda hard to master**</li>
</ul>
</div>
<div id="trueninja" class="step hideable factsmyths" data-x="-330" data-y="-300" data-z="500" data-scale="0.15" data-rotate-x="-30">
<ul>
<li>** ok, very hard to become a true ninja</li>
</ul>
</div>
<div id="gitbook" class="step hideable factsmyths" data-x="-330" data-y="-500" data-z="500" data-scale="0.15" data-rotate-x="-30">
<p>Though free Scott Chacon's book (<a href="http://git-scm.com/book">available for free online</a>) is the only thing you need to really learn most of the Git power features. And it is not that long - a free weekend is all that separates you from becoming a Git poweruser.</p>
</div>
<div class="step slide factsmyths" data-x="1000" data-y="-1500">
<q><i>"Mercurial doesn't give you the power!"</i> say Git's power users.
<ul>
<li>history is (too) sacred</li>
<li>no index</li>
<li>poor branching model</li>
<li>user is too limited</li>
</ul>
</q>
</div>
<div class="step slide factsmyths" data-x="1000" data-y="-750">
<q>In reality, Mercurial has tons of plugins and disabled features.
<ul>
<li>MQ gives you index (and more)*</li>
<li>plugins for rewriting history*</li>
<li>enableable power features</li>
<li>power is in simplicity</li>
</ul>
</q>
</div>
<div class="step hideable factsmyths" data-x="670" data-y="-490" data-scale="0.15">
<ul>
<li>* there are so many plugins it is hard to grasp it</li>
<li>* not out of the box? what about support?</li>
<li>* finding a plugin to match your needs is an extra effort</li>
</ul>
</div>
<div class="step slide factsmyths" data-x="1000" data-y="0">
<q>Mercurial <strong>does</strong> have its vices, and <strong>so does</strong> Git.</q>
</div>
<div id="coolMerge" class="step wideslide data-x="-100" data-y="0">
<p><a href="http://osdir.com/ml/version-control.git/2005-06/msg00792.html">Coolest merge ever</a> (according to Linus):</p>
<pre><code>
git fetch <project-to-union-merge>
GIT_INDEX_FILE=.git/tmp-index git-read-tree FETCH_HEAD
GIT_INDEX_FILE=.git/tmp-index git-checkout-cache -a -u
git-update-cache --add -- (GIT_INDEX_FILE=.git/tmp-index git-ls-files)
cp .git/FETCH_HEAD .git/MERGE_HEAD
git commit
</code></pre>
<p>This would merge an unrelated repo into current one</p>
</div>
<div id="wtf" class="step wtf" data-x="-1510" data-y="-140" data-rotate="90" data-scale="3.2">
<img src="wtf.jpeg" width="520px" height="*"/>
<p>what the?</p>
</div>
<div id="gitPull" class="step slide" data-x="-3250" data-y="290" data-scale="1.5" data-rotate="180">
<q><strong>git pull <other repo url></strong> is all you need right now.</q>
<q>The post was from 2005 - very early days</q>
</div>
<div id="svngitmercurial" class="step svn" data-x="-3300" data-y="-500" data-scale="1.2" data-rotate="180">
<p>SVN / Git / Mercurial</p>
</div>
<div class="step slide svn" data-x="-3250" data-y="-1325" data-scale="1.5" data-rotate="180">
<q>SVN, apart from being centralized, has a couple important characteristics:
<ul>
<li>stores changesets in deltas</li>
<li>poor branching model</li>
<li>dead simple</li>
</ul>
</q>
</div>
<div class="step imgslide svn" data-x="-3630" data-y="-2120" data-scale="0.7" data-rotate="0">
<q>Rough representation of SVN and Mercurial storage model</q>
<div><img src="svn-deltas.png" /></div>
</div>
<div class="step imgslide svn" data-x="-2880" data-y="-2120" data-scale="0.7" data-rotate="0">
<q>Rough representation of Git storage model</q>
<div><img src="git-repo-model.png" /></div>
</div>
<div class="step slide svn" data-x="-2880" data-y="-2650" data-scale="0.7" data-rotate="180">
<q>Branching model.
<ul>
<li>In SVN branch is just a folder copy</li>
<li>Git has lightweight local branches and tracking branches</li>
<li>Mercurial has annotated branches and bookmarks</li>
</ul>
</q>
</div>
<div class="step slide svn" data-x="-3630" data-y="-2650" data-scale="0.7" data-rotate="0">
<q>Merging changes between branches - ever tried this in SVN?</q>
<q>Branch merging in SVN is a nightmare. In <strong>Git</strong> and <strong>Mercurial</strong> it just works!</q>
</div>
<div id="fatality" class="step" data-x="-3630" data-y="-2650" data-z="800" data-rotate-x="30" data-scale="0.7">
<img src="fatality.png" />
<p>SVN vs Git / Mercurial</p>
</div>
<div id="commandsComparison" class="step hideable svn" data-x="-3630" data-y="-3180" data-scale="0.7" data-rotate="0">
<table style="width: 900px;">
<tbody>
<tr style="border-bottom: 1px solid black;">
<th>
<h4><strong>Subversion (SVN)</strong></h4>
</th>
<th>
<h4><strong>Mercurial (Hg)</strong></h4>
</th>
<th>
<h4><strong>Git</strong></h4>
</th>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn add</td>
<td><strong>hg add</strong></td>
<td><strong>git add</strong></td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn blame</td>
<td><strong>hg blame</strong></td>
<td><strong>git blame</strong></td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn cat</td>
<td><strong>hg cat</strong></td>
<td>git show</td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn checkout</td>
<td>hg clone</td>
<td>git clone</td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn commit</td>
<td>hg commit ; hg push</td>
<td>git commit -a ; git push</td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn delete/remove</td>
<td><strong>hg remove</strong></td>
<td>git rm</td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn diff</td>
<td><strong>hg diff</strong></td>
<td><strong>git diff</strong>, git diff --cached</td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn help</td>
<td><strong>hg help</strong></td>
<td><strong>git help</strong></td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn log</td>
<td><strong>hg log</strong></td>
<td><strong>git log</strong></td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn revert</td>
<td><strong>hg revert</strong></td>
<td>git checkout -f</td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn status</td>
<td><strong>hg status</strong></td>
<td><strong>git status</strong></td>
</tr>
<tr style="border-bottom: 1px solid lightgrey;">
<td>svn update</td>
<td>hg pull --update</td>
<td>git pull</td>
</tr>
<tr>
<td>svn move/rename</td>
<td><strong>hg move/rename</strong></td>
<td>git mv</td>
</tr>
<tr>
<td>?</td>
<td>hg backout</td>
<td>git revert</td>
</tr>
</tbody>
</table>
<p>Source: <a href="http://blogs.atlassian.com/2012/02/mercurial-vs-git-why-mercurial/">http://blogs.atlassian.com/2012/02/mercurial-vs-git-why-mercurial/</a> + edits</p>
</div>
<div id="git" class="step git" data-x="-4500" data-y="-1750" data-scale="2" data-rotate="90">
Git - strengths and weaknesses
</div>
<div id="gitindex" class="step imgslide git" data-x="-4700" data-y="-800" data-scale="0.4" data-rotate="0">
<q>Git introduces a concept of an index (or staging area). It is an extra step, but helps with crafting a commit.</q>
<div><img src="git-workflow.png" /></div>
</div>
<div class="step slide git" data-x="-4300" data-y="-800" data-scale="0.4" data-rotate="0">
<q>
Git offers ultra-fast branching. Branch is just a pointer to a commit.
</q>
<q>Creating a branch == writing 41 bytes to a file (40 chars + newline).</q>
</div>
<div class="step imgslide git" data-x="-4300" data-y="-500" data-scale="0.4" data-rotate="0">
<q>Git's repo is a bunch of objects and pointers:
<ul class="small">
<li>head and branch are pointers</li>
<li>commit is an object that points to its parents</li>
</ul>
</q>
<img src="git-repo-commits.png" />
</div>
<div class="step imgslide git" data-x="-4700" data-y="-500" data-scale="0.4" data-rotate="0">
<q>Git's commit is an object that points to its tree. This tree itself points to other trees or blobs.
</q>
<img src="git-commit-internal.png" />
</div>
<div class="step slide git" data-x="-4700" data-y="-200" data-scale="0.4" data-rotate="0">
<q>
In Git a commit is identified by a SHA1 of its contents and parent(s). Therefore it is immutable.
</q>
<q>
The same applies to all Git's objects. This makes up for great consistency!
</q>
</div>
<div class="step slide git" data-x="-4300" data-y="-200" data-scale="0.4" data-rotate="0">
<q>
Rewriting history: Git can do it.
<ul>
<li>You can ammend last commit.</li>
<li>Rebase instead of merging.</li>
<li>Interactive rebase power!</li>
</ul>
</q>
</div>
<div id="gitCli" class="step slide git" data-x="-4300" data-y="100" data-scale="0.4" data-rotate="0">
<q>
Git's command line <strong>is</strong> messy. To drop a branch / stash / remote branch you do:
<ul>
<li>git branch -d <branch name></li>
<li>git stash drop <stash name></li>
<li>git push origin :<branch name></li>
</ul>
</q>
</div>
<div id="wtf1" class="step" data-x="-1510" data-y="-140" data-rotate="90" data-scale="3.2">
</div>
<div id="mercurial" class="step mercurial" data-x="-1550" data-y="2100" data-scale="1.8" data-rotate="180">
Mercurial - strengths and weaknesses
</div>
<div class="step imgslide mercurial" data-x="-740" data-y="1600" data-scale="0.4" data-rotate="180">
<q>
Key differences in commits structure:
<ul class="small">
<li>anonymous heads (no branch pointers)</li>
<li>named branches</li>
<li>no octopus merge</li>
</ul>
</q>
<img src="hg-repo-commits.png" />
</div>
<div class="step imgslide mercurial" data-x="-1150" data-y="1600" data-scale="0.4" data-rotate="180">
<q>
<ul class="small">
<li>flat manifest file</li>
<li>manifest entry points to a revision in revlog</li>
<li>revlog stores all file's revision</li>
<li>revlog's index shows revision's length and offset</li>
</ul>
</q>
<img src="hg-changeset-internal.png" />
</div>
<div class="step slide mercurial" data-x="-1560" data-y="1600" data-scale="0.4" data-rotate="180">
<q>
In Mercurial each file is stored in a single revlog file (+index file).<br/>
Building file revision - log(1):
<ul>
<li>finding a revision info in index</li>
<li>reading length and offset in revlog</li>
<li>adding up a few deltas</li>
</ul>
</q>
</div>
<div class="step slide mercurial" data-x="-1970" data-y="1600" data-scale="0.4" data-rotate="180">
<q>
- A changeset and revlog entry is identified by a SHA-1 string (called nodeid).
Revlogs are append only.
<br/>
- Basic history edition - hg rollback undoes last operation (i.e. commit or pull).
This cannot be undone...
<br/>
- hg commit --amend since mid-2012
</q>
</div>
<div id="localRevId" class="step slide mercurial" data-x="-1970" data-y="1270" data-scale="0.4" data-rotate="180">
<q>
Apart from global SHA-1 nodeid, each changeset has a sequential local revision id.
This does <strong>not</strong> propagate cross-repo and can be different for each user...
</q>
</div>
<div id="wtf2" class="step" data-x="-1510" data-y="-140" data-rotate="90" data-scale="3.2">
</div>
<div id="mqExt" class="step slide mercurial" data-x="-1560" data-y="1270" data-scale="0.4" data-rotate="180">
<q>
MQ extension: index and "history edit":
<ul class="medium">
<li>adds index-like feature</li>
<li>many queues support for storing patches</li>
<li>allows for patches versioning</li>
<li>until patch in queue is commited you can edit, rearrange etc.</li>
</ul>
</q>
</div>
<div id="mercurialPros" class="step slide mercurial" data-x="-1150" data-y="1270" data-scale="0.4" data-rotate="180">
<q>
<ul>
<li>commands have less switches - clearer doc</li>
<li>tutorials sub-par comparing to the free git-book</li>
<li>documetnation and tutorials for plugins / extensions has low quality</li>
</ul>
</q>
</div>
<div id="dvcsincorpo" class="step" data-x="1800" data-y="-600" data-scale="1.8" data-rotate="90">
DVCS in corporation
</div>
<div class="step slide" data-x="2100" data-y="-1400" data-scale="0.4" data-rotate="90">
<q>
Corporations need not fret the "distributed".
<ul>
<li>centralizing a DVCS repo is a common practice</li>
<li>coworkers can still exchange work before it is ready for central repo</li>
</ul>
</q>
</div>
<div class="step slide" data-x="2100" data-y="-1000" data-scale="0.4" data-rotate="90">
<q>
<ul class="medium">
<li>Git and Mercurial are blazing fast</li>
<li>Additional repo backup "for free"</li>
<li>Easy <strong>branching</strong> and <strong>merging</strong> - a blessing in a rapid environment (hotfixing, shifting releases, retrofitting)</li>
<li>Git's <strong>cherrypick</strong> (Mercurial's <strong>transplant extension</strong>) wonderful in a hotifx environment!</li>
</ul>
</q>
</div>
<div class="step slide" data-x="2100" data-y="-600" data-scale="0.4" data-rotate="90">
<q>
Employees get extra productive when tools do not delay them. Local repo copy:
<ul>
<li>Almost instant diffs</li>
<li>Fast annotate (blame) / bisect</li>
<li>Frustration free branching experience</li>
</ul>
</q>
</div>
<div id="qna" class="step" data-x="600" data-y="1000" data-scale="2">
<p>Q & A</p>
</div>
<div id="thanks" class="step" data-x="700" data-y="2300" data-scale="2">
<p>Thanks!</p>
</div>
<div id="overview" class="step" data-x="-1500" data-y="-500" data-scale="8">
</div>
<div id="impressjsslide" class="step" data-x="1500" data-y="8000" data-scale="50">
<p id="madewith">Made with <div id="impressjslink"><a href="https://github.com/bartaz/impress.js">impress.js!</a></div></p>
<p class="kudos">Kudos to <a href="http://bartaz.github.com/">bartaz (Bartek Szopka)</a> for creating it!</p>
</div>
</div>
<script src="impress.js"></script>
<script>
impress().init();
$('#roundone').get(0).addEventListener('impress:stepenter', function() {
$('#roundoneclip').get(0).play();
});
$('#fatality').get(0).addEventListener('impress:stepenter', function() {
setTimeout(function() {
$('#fatalityclip').get(0).play();
}, 2400);
});
</script>
</body>
</html>