-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
442 lines (333 loc) · 19 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
<!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>@chickamade $ whatis git</title>
<meta name="description" content="a presentation about git, the stupid content tracker, for the novice and the semi-experienced git user." />
<meta name="author" content="@chickamade" />
<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="css/impress.css" rel="stylesheet" />
<link rel="shortcut icon" href="favicon.png" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
</head>
<body class="impress-not-supported">
<div class="fallback-message">
<p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
<p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
</div>
<!--
Now that's the core element used by impress.js.
That's the wrapper for your presentation steps. In this element all the impress.js magic happens.
It doesn't have to be a `<div>`. Only `id` is important here as that's how the script find it.
You probably won't need it now, but there are some configuration options that can be set on this element.
To change the duration of the transition between slides use `data-transition-duration="2000"` giving it
a number of ms. It defaults to 1000 (1s).
You can also control the perspective with `data-perspective="500"` giving it a number of pixels.
It defaults to 1000. You can set it to 0 if you don't want any 3D effects.
If you are willing to change this value make sure you understand how CSS perspective works:
https://developer.mozilla.org/en/CSS/perspective
But as I said, you won't need it for now, so don't worry - there are some simple but interesing things
right around the corner of this tag ;)
-->
<div id="impress">
<!--
Here is where interesting thing start to happen.
Each step of the presentation should be an element inside the `#impress` with a class name
of `step`. These step elements are positioned, rotated and scaled by impress.js, and
the 'camera' shows them on each step of the presentation.
Positioning information is passed through data attributes.
In the example below we only specify x and y position of the step element with `data-x="-1000"`
and `data-y="-1500` attributes. This means that **the center** of the element (yes, the center)
will be positioned in point x = -1000px and y = -1500px of the presentation 'canvas'.
It will not be rotated or scaled.
-->
<div id="cover" class="step slide" data-x="-1000" data-y="-1500">
<q>@chickamade $ whatis git</q>
<p>the stupid content tracker ...</p>
</div>
<!--
The `id` attribute of the step element is used to identify it in the URL, but it's optional.
If it is not defined, it will get a default value of `step-N` where N is a number of slide.
So in the example below it'll be `step-2`.
The hash part of the url when this step is active will be `#/step-2`.
You can also use `#step-2` in a link, to point directly to this particular step.
Please note, that while `#/step-2` (with slash) would also work in a link it's not recommended.
Using classic `id`-based links like `#step-2` makes these links usable also in fallback mode.
-->
<div class="step slide" data-x="0" data-y="-1500">
<q>git init</q>
<p>For the first 10 years of kernel maintenance, we literally used <b>tarballs and patches</b>, which is a much superior source control management system than CVS is.</p>
<p><em>There is no way to do CVS right.</em></p>
<p style="float: right">Linus Torvalds<p>
</div>
<div id="stupid" class="step" data-x="0" data-y="0" data-rotate="90" data-scale="2">
<q>"Should I hacked together a stupid content tracker during my weekend so I can stop using this CVS/SVN shit?!?"</q><br />
<span class="footnote">or so thought Linus, and over a few months ...</span>
</div>
<div id="design" class="step" data-x="3000" data-y="0" data-rotate="0" data-scale="6">
<p>git was created, its design criteria:</p>
<ul>
<li>high performance</li>
<li>non-linear development</li>
<li>strong integrity</li>
</ul>
</div>
<!--
And the last one shows full power and flexibility of impress.js.
You can not only position element in 3D, but also rotate it around any axis.
So this one here will get rotated by -40 degrees (40 degrees anticlockwise) around X axis and
10 degrees (clockwise) around Y axis.
You can of course rotate it around Z axis with `data-rotate-z` - it has exactly the same effect
as `data-rotate` (these two are basically aliases).
-->
<div id="perf" class="step slide" data-x="5500" data-y="0" data-rotate-x="10" data-rotate-y="-30" data-scale="1">
<h1>cache-concious design</h1>
<img class="center" src="git-local-remotes.png"><img>
</div>
<div id="distributed" class="step slide" data-x="6000" data-y="0" data-z="-2000" data-rotate-x="10" data-rotate-y="-30" data-scale="1">
<h1>all repository are created equal !!!</h1>
<img class="center" src="alleq.png" />
</div>
<div id="svn" class="step slide" data-x="6500" data-y="0" data-z="-4000" data-rotate-x="10" data-rotate-y="-30" data-scale="1">
<h1>unless one is promoted to be the <b>origin</b> of all things (just like svn)</h1>
<img class="center" src="workflow-a.png" />
</div>
<div id="github" class="step slide" data-x="7000" data-y="0" data-z="-6000" data-rotate-x="10" data-rotate-y="-30" data-scale="1">
<h1>github: you may fork, but you must request to be pulled</h1>
<img class="center" src="workflow-b.png" />
</div>
<div id="dictator" class="step slide" data-x="7500" data-y="0" data-z="-8000" data-rotate-x="10" data-rotate-y="-30" data-scale="1">
<h1>dictator: be careful of who you trust when merging!</h1>
<img class="center" src="workflow-c.png" />
</div>
<div id="integrity" class="step slide" data-x="8000" data-y="0" data-z="-10000" data-rotate-x="10" data-rotate-y="-30" data-scale="1">
<q>authentication of history</q>
<ul>
<li>each commit hash identify the snapshot content and the full associated history (more details comming)</li>
<li>each tag is an immutable pointer to a commit hashes</li>
<li>tags can be cryptographically signed with GPG</li>
</ul>
</div>
<div id="engineering" class="step" data-x="3000" data-y="2400" data-rotate="0" data-scale="6">
<q>git engineering</q>
<ul>
<li>content-addressable object database</li>
<li>Five (5) object types: blob, tree, commit, tag & branches</li>
</ul>
</div>
<div id="objects" class="step slide vertical" data-x="6400" data-y="2800" data-scale="3">
<img class="center" src="git-objects.png" />
</div>
<div id="commits" class="step slide" data-x="8000" data-y="1600" data-rotate="15" data-scale="1">
<h1>commits are snapshots, not deltas</h1>
<img class="center" src="git-blobs.png" />
</div>
<div id="singleparent" class="step slide" data-x="8000" data-y="2400" data-rotate="15" data-scale="1">
<h1>each commit points to its parent (knows its own history)</h1>
<img class="center" src="git-commits.png" />
</div>
<div id="merges" class="step slide" data-x="8000" data-y="3200" data-rotate="15" data-scale="1">
<q>merge is a commit with <em>N</em> parents, retaining merge history</q>
<img class="center" src="merge-history.png" />
</div>
<div id="branches" class="step slide" data-x="8000" data-y="4000" data-rotate="15" data-scale="1">
<h1>tags & branches are simply pointers to commits</h1>
<img class="center" src="git-branches.png" />
</div>
<div id="getstarted" class="step slide" data-x="-2400" data-y="-500" data-rotate="45" data-scale="2">
<h1>getting started</h1>
<pre># git let you choose your display name
$ git config --global user.name "Your Name"
$ git config --global user.email you@yourdomain
# to start new repo
$ git init
# to clone an existing one
$ git clone https://github.com/git/git.git
# for access control
# you'll need to have a RSA/DSA key pair
</pre>
</div>
<div id="basicops" class="step slide" data-x="-2400" data-y="1500" data-rotate="0" data-scale="4">
<h1>basic operations</h1>
<img class="center" src="git-local-remotes.png"><img>
</div>
<div id="basicflow" class="step slide" data-x="-4800" data-y="1500" data-rotate="0" data-scale="2">
<q>basic day to day work flow</q>
<ul>
<li>git checkout working-branch</li>
<li>git fetch && git merge origin master</li>
<li>vim work.py</li>
<li>git diff</li>
<li>git add work.py<li
<li>git commit -m 'meaningful messages'</li>
<li>git push origin working-branch</li>
</ul>
</div>
<div id="staging" class="step slide" data-x="-4800" data-y="3000" data-rotate="-20" data-scale="2">
<h1>partial commit with staging area (GUI recommended, e.g. GitX)</h1>
<p>one afternoon, you made changes to 15 files; now you want to commit it in 3 parts!</p>
<pre>
$ touch foo.py bar.py bazzz.py
$ git add foo.py bar.py
# alternatively, staging patch by patch, interactively
$ git add -p
# this reset the staging area, but leaving the working tree dirty
$ git reset
</pre>
</div>
<div id="cleanup" class="step slide" data-x="-4800" data-y="4500" data-rotate="-20" data-scale="2">
<h1>cleaning up the mess</h1>
<pre># just unstage the file, don't overwrite working copy
$ git reset HEAD -- file.py
# checkout file from HEAD, overwriting working copy
$ git checkout -- oldstuff.py
# checkout subdir from old version, overwriting working copy
git checkout v3.25.1 -- path/to/dir
# i committed and pushed something is just broken :(,
# this makes an extra commit that is
# the negatation the changes in badcommit.
$ git revert badcommit
</pre>
</div>
<div id="hist" class="step slide" data-x="-4800" data-y="6000" data-rotate="-20" data-scale="2">
<h1>viewing history</h1>
<pre># idonethis!
$ git log --author=Hai-Anh --since="12 hours ago"
# list all commits since branch 3.24
$ git log v3.24..master >> release-notes.txt
# did anyone touch the config file?
$ git log v3.24..master -- src/config/settings.py
# show file diff against old version
$ git diff v2.5.1:foobar.py HEAD:foobar.py
# grepping through history
$ git grep XXX v3.25
</pre>
</div>
<div id="80branches" class="step slide" data-x="-3000" data-y="5000" data-rotate="-90" data-scale="1">
<h1>too many branches???</h1>
<img class="center" src="wide-gitk.gif" />
</div>
<div id="rebase" class="step slide" data-x="-2200" data-y="5000" data-rotate="-90" data-scale="1">
<h1>use rebase for a linear history</h1>
<img class="center" src="rebase.png" />
<p class="caption">rebase rewrites history, use it for <b>local</b> changes only!</p>
</div>
<div id="jobdone" class="step slide" data-x="-1400" data-y="5000" data-rotate="-90" data-scale="1">
<h1>git is flexible, and get the job done</h1>
<pre># forgot to commit a new file, but local changes not pushed yet
$ git add forgotten.py
$ git commit --amend
# i want that fix in my branch, now!
$ git cherry-pick ${sha1}
# i was working on feature X, made changes to 10 files
# now i must leave it aside to work on a hotfix
$ git stash save 'partial work on feature X'
$ git checkout -b v2.30.1-hotfix v.2.30.1 # work on hotfix
$ git checkout working-branch
$ git stash pop
</pre>
</div>
<div id="next" class="step slide" data-x="1000" data-y="5000" data-rotate="0" data-scale="4">
<h1>where next?</h1>
<ul>
<li>Choose a GUI: <a href="http://git-scm.com/downloads/guis">Official GUI clients list</a>, my fav is <a href="http://gitx.laullon.com/">GitX</a> on OS X, if you use Eclipse then use <a href="http://www.eclipse.org/egit/">EGit</a>.</li>
<li>Read the <a href="http://git-scm.com/docs/gittutorial">official tutorial</a> ($ man gittutorial).</li>
<li>Follow the <a href="http://gitimmersion.com/">git immersion</a>, a guided tour of git.</li>
<li>Read <a href="http://www-cs-students.stanford.edu/~blynn/gitmagic/">git magic</a>, a more involved/advanced tour of git.</li>
<li>Read the <a href="http://git-scm.com/book">Pro Git book</a>, it's quite short & sweet.</li>
<li><a href="http://git-scm.com/docs">RTFM</a></li>
<li>Hangout on #git on <a href="irc://irc.freenode.net/git">irc.freenode.net</a>.</li>
</ul>
<p class="caption" style="margin-top: 50px">brought to you by<a href="http://twitter.com/chickamade">@chickamade</a>, engineer at <a href="https://klamr.to/">klamr.to</a>.</p>
</div>
<div id="overview" class="step" data-x="1400" data-y="1600" data-scale="12">
</div>
<!--
This step here doesn't introduce anything new when it comes to data attributes, but you
should notice in the demo that some words of this text are being animated.
It's a very basic CSS transition that is applied to the elements when this step element is
reached.
At the very beginning of the presentation all step elements are given the class of `future`.
It means that they haven't been visited yet.
When the presentation moves to given step `future` is changed to `present` class name.
That's how animation on this step works - text moves when the step has `present` class.
Finally when the step is left the `present` class is removed from the element and `past`
class is added.
So basically every step element has one of three classes: `future`, `present` and `past`.
Only one current step has the `present` class.
-->
<!--div id="ing" class="step" data-x="3500" data-y="-850" data-rotate="270" data-scale="6">
<p>by <b class="positioning">positioning</b>, <b class="rotating">rotating</b> and <b class="scaling">scaling</b> them on an infinite canvas</p>
</div>
<div id="imagination" class="step" data-x="6700" data-y="-300" data-scale="6">
<p>the only <b>limit</b> is your <b class="imagination">imagination</b></p>
</div>
<div id="source" class="step" data-x="6300" data-y="2000" data-rotate="20" data-scale="4">
<p>want to know more?</p>
<q><a href="http://github.com/bartaz/impress.js">use the source</a>, Luke!</q>
</div>
<div id="one-more-thing" class="step" data-x="6000" data-y="4000" data-scale="2">
<p>one more thing...</p>
</div-->
<!--div id="its-in-3d" class="step" data-x="6200" data-y="4300" data-z="-100" data-rotate-x="-40" data-rotate-y="10" data-scale="2">
<p><span class="have">have</span> <span class="you">you</span> <span class="noticed">noticed</span> <span class="its">it's</span> <span class="in">in</span> <b>3D<sup>*</sup></b>?</p>
<span class="footnote">* beat that, prezi ;)</span>
</div-->
<!--
So to make a summary of all the possible attributes used to position presentation steps, we have:
* `data-x`, `data-y`, `data-z` - they define the position of **the center** of step element on
the canvas in pixels; their default value is 0;
* `data-rotate-x`, `data-rotate-y`, 'data-rotate-z`, `data-rotate` - they define the rotation of
the element around given axis in degrees; their default value is 0; `data-rotate` and `data-rotate-z`
are exactly the same;
* `data-scale` - defines the scale of step element; default value is 1
These values are used by impress.js in CSS transformation functions, so for more information consult
CSS transfrom docs: https://developer.mozilla.org/en/CSS/transform
-->
</div>
<!--
Hint is not related to impress.js in any way.
But it can show you how to use impress.js features in creative way.
When the presentation step is shown (selected) its element gets the class of "active" and the body element
gets the class based on active step id `impress-on-ID` (where ID is the step's id)... It may not be
so clear because of all these "ids" in previous sentence, so for example when the first step (the one with
the id of `bored`) is active, body element gets a class of `impress-on-bored`.
This class is used by this hint below. Check CSS file to see how it's shown with delayed CSS animation when
the first step of presentation is visible for a couple of seconds.
...
And when it comes to this piece of JavaScript below ... kids, don't do this at home ;)
It's just a quick and dirty workaround to get different hint text for touch devices.
In a real world it should be at least placed in separate JS file ... and the touch content should be
probably just hidden somewhere in HTML - not hard-coded in the script.
Just sayin' ;)
-->
<div class="hint">
<p>Use a spacebar or arrow keys to navigate</p>
</div>
<script>
if ("ontouchstart" in document.documentElement) {
document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
}
</script>
<script src="js/impress.js"></script>
<script>impress().init();</script>
<!--
The `impress()` function also gives you access to the API that controls the presentation.
Just store the result of the call:
var api = impress();
and you will get three functions you can call:
`api.init()` - initializes the presentation,
`api.next()` - moves to next step of the presentation,
`api.prev()` - moves to previous step of the presentation,
`api.goto( idx | id | element, [duration] )` - moves the presentation to the step given by its index number
id or the DOM element; second parameter can be used to define duration of the transition in ms,
but it's optional - if not provided default transition duration for the presentation will be used.
You can also simply call `impress()` again to get the API, so `impress().next()` is also allowed.
Don't worry, it wont initialize the presentation again.
For some example uses of this API check the last part of the source of impress.js where the API
is used in event handlers.
-->
</body>
</html>