forked from jeremyprice/GettingGit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
515 lines (493 loc) · 39.5 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
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
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
<!DOCTYPE html>
<html class="sl-root base export loaded">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Getting Git: Slides</title>
<meta name="description" content="Slides">
<link rel="stylesheet" type="text/css" href="lib/offline-v2.css">
</head>
<body class="reveal-viewport theme-font-sketch theme-color-silver-green">
<div class="reveal">
<div class="slides">
<section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 250px; height: auto;" data-block-id="293cccdc86c4362b49b0d47275771821"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text" style="z-index: 10;">
<h1>Getting Git</h1>
</div></div>
<div class="sl-block" data-block-type="image" data-block-id="5bee732196325baeec3b7f241a61be41" style="min-width: 30px; min-height: 30px; width: 360px; height: 150.32967032967px; left: 300px; top: 369px;"><div class="sl-block-content" style="z-index: 12;"><img data-natural-width="910" data-natural-height="380" style="" data-src="getting-git/1645886-Git-Logo-2Color.png"></div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="010758a4eb87460063a20dcdef62f8cd"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Intros</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="fbc36d240effe68cb745743550d9f595"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Name</li>
<li>Job/Role</li>
<li>Length of time at Rackspace</li>
<li>What you hope to get from this class</li>
<li>Previous experience with version control tools</li>
</ul>
</div></div></section></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="c44b904b11e80e4707a795dce71cb4c9"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Learning Objectives</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="b5cccb6433fff299213d7dc610fa49e5"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Learn what version control is</li>
<li>Recognize what Git and Github are and how they are used</li>
<li>Practice day to day Git usage</li>
<li>Collaborate online through GitHub<br>
</li>
</ul>
</div></div></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="5514ea185f3cd3c8459afca5953b5b0b"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>What is Version Control</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="d327dfab79568aa7425ffec0e33a52fc"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li>A time machine for files and projects</li>
<li>Snapshots/checkpoints of the project as a timeline</li>
<li>Also referred to as revision control</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="53bb12d63547b76f59a57e45e241ddd8"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 11;">
<h2>Why use Version Control?</h2>
</div></div>
<div class="sl-block" data-block-type="image" data-block-id="c5f876407f99a993f71460f9d2fcad42" style="min-width: 30px; min-height: 30px; width: 822.222222222222px; height: 296px; left: 69px; top: 271px;"><div class="sl-block-content" style="z-index: 12;"><img data-natural-width="650" data-natural-height="234" style="" data-src="getting-git/1616023-pasted-from-clipboard.png"></div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 70px; height: auto;" data-block-id="0400481ee847c79edc3872bd5342a4b9"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>What should we use Version Control for?</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 232px; height: auto;" data-block-id="63905afb345928709ee62374a2fa948a"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li class="visible">Different kinds of files
<ul>
<li style="color:rgb(17, 17, 17)">Text files
<ul>
<li style="color:rgb(17, 17, 17)">Scripts, config files, software, etc.</li>
</ul>
</li>
<li style="color:rgb(17, 17, 17)">Binary files (with caveats)</li>
<li style="color:rgb(17, 17, 17)">Images / logos (with caveats)</li>
</ul>
</li>
<li class="visible">Files that are shared with others
<ul>
<li>Anything that can be changed by multiple folks</li>
</ul>
</li>
<li class="visible">Managing the flow of changes
<ul>
<li>Deploying known versions of files</li>
</ul>
</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 33px; height: auto;" data-block-id="8986e426d590b8250d4c0652d81f2550"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 11;">
<h2>What is Version Control</h2>
</div></div>
<div class="sl-block" data-block-type="image" style="width: 779.63924963925px; height: 557px; left: 90px; top: 96px;" data-block-id="8c5c494637d7f2e1be0f9faa41dc1b2e"><div class="sl-block-content" style="z-index: 12;"><img data-natural-width="970" data-natural-height="693" style="" data-src="getting-git/1615842-what-is-vcs.png"></div></div>
<div class="sl-block" data-block-type="text" data-block-id="53b2486dbf42811467137607afafdd65" style="height: auto; min-width: 30px; min-height: 30px; width: 960px; left: 0px; top: 653px;"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 13; font-size: 48%;">
<p>Graphic from <a href="http://www.git-tower.com/learn/git/ebook/command-line/basics/what-is-version-control" target="_blank">http://www.git-tower.com/learn/git/ebook/command-line/basics/what-is-version-control</a></p>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="7d016a5807de9f8087f6acf3e256e3ff"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Nomenclature</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="49690eb3fe023a407bdab1833753aa3f"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Version control</li>
<li>Source control</li>
<li>Revision control</li>
</ul>
</div></div></section></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 33px; height: auto;" data-block-id="bc6f46d71ba845c4a81939f9d89a77a8"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Work Flow</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 140px; height: auto;" data-block-id="4648e6d59d1c1fb7d152a4200c7867b9"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Get / open a repository
<ul>
<li>Pull down changes shared with you by others</li>
</ul>
</li>
<li>Create a branch for your work</li>
<li>Do some work
<ul>
<li>Check in (commit) changes periodically</li>
</ul>
</li>
<li>Push your branch to a server to share your work with others</li>
<li>Merge branches to bring changes into the main "master" branch</li>
<li>Lather, rinse, repeat</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 66px; height: auto;" data-block-id="0099ae79f79a3b55e0d81124c52ea144"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Work Flow</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 156px; height: auto;" data-block-id="65403175fbeed54d37763f9e7751560d"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Each step in that workflow maps to a Git command
<ul>
<li>or a set of Git commands</li>
</ul>
</li>
<li>You can map your own workflow activities to Git
<ul>
<li>It is really flexible</li>
</ul>
</li>
<li>We will work on labs that illustrate all these workflow steps</li>
</ul>
</div></div></section></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="82e259eac548dceff142282e551c41a2"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Use Case 1:</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="9548b5dec0def79bc706702365e322be"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Multiple people (team members) working on the same stuff</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="655274b215fb0c3b641d79f37b4aa62f"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Use Case 2:</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="d159bd09fa8a26824b6f91e75535d6ef"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Keeping track of changes as you manage a system</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="f09c0e3aba7ccad690583b54dba90534"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Use Case 3:</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="4a3058f27eb1466251c5370e0b320c37"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Tracking / managing common configs across multiple systems</li>
</ul>
</div></div></section></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 270px; height: auto;" data-block-id="3caf931e3d0f446704179b549a645fe4"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text">
<h1>War Stories</h1>
</div></div></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="1a1ba564b9dcfbdc185e855af40ae99e"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text">
<h1>What is Git?</h1>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="65781d003521a7ce3bfb9400e3486589"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>What is Git</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="1b7b9241b20f5d4757ebe7808b01fa9a"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>From the web: Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.</li>
<li>Git is a suite of tools for you to implement version control
<ul>
<li>The core stuff is command line</li>
<li>GUIs are available (more on that later)</li>
</ul>
</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="fab9f034038bdad8f069908efa8d3044"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Installing Git</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="d6bf288722ea937e83c69996cf710a28"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" dir="ui">
<ul>
<li>Git is available for all the major OSes
<ul>
<li>Linux, Windows, OS X</li>
</ul>
</li>
<li><a href="http://git-scm.com/downloads" target="_blank">http://git-scm.com/downloads</a></li>
<li>We will experience this in the upcoming lab</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="58359d0e6f6f0070fd418f44fff1c6fe"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>What is a repository?</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="1bd98bb520f52c217548ae66c691106d"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>A repository is the place that stores all the data for your version controlled directory
<ul>
<li>database for all the versions, metadata, file contents, etc.</li>
</ul>
</li>
<li>A repository can live on a local machine, cloud server, or other nebulous device</li>
<li>Repositories can be cloned and shared</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 189px; height: auto;" data-block-id="d984d10c877af88da01285e707a58228"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Git Commands - init</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 263px; height: auto;" data-block-id="f6f386fcb0adda542e83a6a78da4a808"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li style="color:rgb(17, 17, 17)">Get / open / create a repository</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" data-block-id="ad04a5fc40e1dd23153ae5d50b288e28" style="height: auto; min-width: 30px; min-height: 30px; width: 235px; left: 340px; top: 332px;"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 13; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align: center;">git init .</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 189px; height: auto;" data-block-id="8a20fa20c71a0b739b35dca61ad18c55"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Git Commands - add</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 263px; height: auto;" data-block-id="a046dbe82ed3f809e3d37431371f879c"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li style="color:rgb(17, 17, 17)">Do some work
<ul>
<li>Check in (commit) changes periodically</li>
</ul>
</li>
<li>To commit your changes first you have to stage them
<ul>
<li>Tell Git which changes you will be committing</li>
</ul>
</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; min-width: 30px; min-height: 30px; width: 640px; left: 160px; top: 574px;" data-block-id="bb3c1f29ddb9657cab658591f7095b31"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 12; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git commit -m "my cool comment"</pre>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; min-width: 30px; min-height: 30px; width: 640px; left: 160px; top: 490px;" data-block-id="ea135025ed455d101df4b2810bfdbea0"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git add my_file.txt image.jpg</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 189px; height: auto;" data-block-id="ed0d986905eb876e07b7f800dbccb693"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Git Commands - rm</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 263px; height: auto;" data-block-id="35ea8282f85f461dbaf6074e5e6a6ee4"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li style="color:rgb(17, 17, 17)">Remove a file (or files) from the repo</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; width: 640px; left: 160px; top: 342px;" data-block-id="0286f6561645d46392bb70489ef8e832"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git rm my_file.txt image.jpg</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 189px; height: auto;" data-block-id="c422079b93e608e0d012f5340099e4dd"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Git Commands - status</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 263px; height: auto;" data-block-id="defc267db6367ecda7b5dc8d18d9babb"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li style="color:rgb(17, 17, 17)">Find out the status of the repo</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; width: 640px; left: 160px; top: 342px;" data-block-id="63e2a6af6fab63bd48b7935829a21c0e"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git status</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 189px; height: auto;" data-block-id="4ecae861569bdc73a850a9e5aee0438c"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Git Commands - reset</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 263px; height: auto;" data-block-id="d11a01efaad6263d676a501a3aba763a"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li style="color:rgb(17, 17, 17)">Unstage a change</li>
<li style="color:rgb(17, 17, 17)">(after an add)</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; width: 640px; left: 160px; top: 342px;" data-block-id="14ee4f734a00480f5ac5ba9834dfc89f"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git reset new_file.txt</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 189px; height: auto;" data-block-id="573889b8e40b2031008adbbd8a7d9fb5"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Git Commands - undo an edit</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 263px; height: auto;" data-block-id="1666c4b8ae962767cb848f645bba30ee"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li style="color:rgb(17, 17, 17)">Undo all edits to a file </li>
<li style="color:rgb(17, 17, 17)">Great caution is advised here</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; width: 640px; left: 160px; top: 341px;" data-block-id="62f11c95c6afe1f3219f66ab75b2cd76"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git checkout -- changed_file.txt</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="4107865c650583b24a55da43092ca6bc"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Lab 1</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 960px; left: 0px; top: 264px; height: auto;" data-block-id="a0ac2817b8943fea135690c432119166"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<p><a href="https://github.com/jeremyprice/GettingGit/blob/master/lab01.md" target="_blank">https://github.com/jeremyprice/GettingGit/blob/master/lab01.md</a></p>
</div></div></section></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 270px; height: auto;" data-block-id="fc51e4a0f7eb08be72081049002a3ecf"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text">
<h1>Branching, Merging, and Conflicts</h1>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="6c4af6073eae5da088a587fb31325d76"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Workflow Continued</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="c0db7c87578101e1daf99c1bdd9f155e"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Working linearly on a project doesn't scale well</li>
<li>We need to be able to work on parallel sets of changes</li>
<li>Thankfully, we have branching and merging</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="48585dc36c7e56d6947e01a2c5d5c42c"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Branching and Merging Illustrated</h2>
</div></div>
<div class="sl-block" data-block-type="image" data-block-id="79047c8d5de5c4032891d3ce85db0b8e" style="min-width: 30px; min-height: 30px; width: 792px; height: 330px; left: 84px; top: 325px;"><div class="sl-block-content" style="z-index: 12;"><img style="" data-natural-width="720" data-natural-height="300" data-src="getting-git/1645840-git-history.png"></div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="1cd56cc3fc781adfa20e693eba10c13e"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Branching</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="b5baa126bc60bd7ec27e81d2ac0831e8"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li>Creating a branch called nice_feature</li>
</ul>
<p> </p>
<ul>
<li>Make that branch the active branch</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; min-width: 30px; min-height: 30px; width: 640px; left: 160px; top: 316px;" data-block-id="242d3d15d049ffa59d544ff0b5df3b9a"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 12; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git branch nice_feature</pre>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; min-width: 30px; min-height: 30px; width: 640px; left: 160px; top: 412px;" data-block-id="e33a3ec642be9669005c7137af0e47dd"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git checkout nice_feature</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="d7273f56c4a8f471bd5c9e2a2049c36c"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 10;">
<h2>Branching</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="aae94ca0148db9498e9e3040300d330c"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 11;">
<ul>
<li>Shortcut: Creating a branch called nice_feature and make it active</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; width: 640px; left: 160px; top: 352px;" data-block-id="4aba6efba25b59989ddf29763af180eb"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 14; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git checkout -b nice_feature</pre>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="f954c6ea8fdaa25f2b3daea357ecd638"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text" style="z-index: 11;">
<h2>Merging Branches</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="6a88aa541b7e0b2c61b332ab0dd285e6"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 12;">
<ul>
<li>Merging branches asks Git to take the changes from one branch and put them in the other</li>
<li>Merge changes from nice_feature into master</li>
</ul>
</div></div>
<div class="sl-block" data-block-type="text" style="height: auto; width: 640px; left: 160px; top: 391px;" data-block-id="47129e56650d6ecd093a5dafcaf28643"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" style="z-index: 13; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);">
<pre style="text-align:center">git checkout master
git merge nice_feature</pre>
</div></div>
<div class="sl-block" data-block-type="image" data-block-id="154927d201bf198271c18db8c641c470" style="min-width: 30px; min-height: 30px; width: 542.4px; height: 226px; left: 209px; top: 463px;"><div class="sl-block-content" style="z-index: 14;"><img data-natural-width="720" data-natural-height="300" style="" data-src="getting-git/1645840-git-history.png"></div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="afd06106b23deb489cec503e2ccef040"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>A note about the master branch</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="983af23cd57e16137f604883e1219296"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>The <strong>master</strong> branch is special</li>
<li>It is considered the core branch that changes are merged into</li>
<li>By convention, master is usually a known state of the files in the repository</li>
<li>It is not the only branch you can merge changes into</li>
<li>From Git's perspective it is just any old branch</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="0a6a22a14fe1bd00e1d22973f2e5fa1c"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Conflicts</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 264px; height: auto;" data-block-id="3e87f321035eec43a056097c02b9c624"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Merge conflicts happen when you try to merge changes that overlap from one branch to another </li>
<li>Example: in your README file
<ul>
<li>
<pre>Branch A: Hello world!</pre>
</li>
<li>
<pre>Branch B:Goodbye world!</pre>
</li>
</ul>
</li>
<li>Git can't tell which one it should go with, so it tells you to pick</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="c74532484314a94a6a3e6468ee79ecfb"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Lab 2</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 960px; left: 0px; top: 264px; height: auto;" data-block-id="d4071256f3f2fb5a8f7e5afc462d34a6"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<p><a href="https://github.com/jeremyprice/GettingGit/blob/master/lab02.md" target="_blank">https://github.com/jeremyprice/GettingGit/blob/master/lab02.md</a></p>
</div></div></section></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 270px; height: auto;" data-block-id="04defae2b77a9352c8ba442495ab2358"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text" style="z-index: 10;">
<h1>GitHub for Collaboration</h1>
</div></div>
<div class="sl-block" data-block-type="image" data-block-id="ab8e6981e4cd92f7458128bfa20c9ecd" style="min-width: 30px; min-height: 30px; width: 360px; height: 210.6px; left: 294px; top: 35px;"><div class="sl-block-content" style="z-index: 12;"><img data-natural-width="400" data-natural-height="234" style="" data-src="getting-git/1645892-GitHub.jpg"></div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 70px; height: auto;" data-block-id="b89f1168704b82b0ab17afac9ccbe1a5"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>GitHub</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 140px; height: auto;" data-block-id="7c2f75cea18b3f456ae26e399a63643f"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>GitHub is a web-based Git repository hosting service
<ul>
<li>Centralized repository</li>
</ul>
</li>
<li>Social coding features
<ul>
<li>pull requests</li>
<li>documentation (markdown)</li>
<li>wikis</li>
<li>issue tracking</li>
<li>small websites</li>
<li>history browsing</li>
<li>code reviews</li>
</ul>
</li>
<li>Example: <a href="https://github.com/jeremyprice/GettingGit" target="_blank">https://github.com/jeremyprice/GettingGit</a>
</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="f2606e186458a99c274ea7d0776243d4"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Lab 3</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 960px; left: 0px; top: 264px; height: auto;" data-block-id="c6a3213110362f3c6c8c604b6077e42f"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<p><a href="https://github.com/jeremyprice/GettingGit/blob/master/lab03.md" target="_blank">https://github.com/jeremyprice/GettingGit/blob/master/lab03.md</a></p>
</div></div></section></section><section class="stack"><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 270px; height: auto;" data-block-id="25a145b0d67cecefc85d19f3830ccc31"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text">
<h1>Other Topics</h1>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 33px; height: auto;" data-block-id="bebd7f181b4e771f2f97f57ddd448b23"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>GUI Clients</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 960px; left: 0px; top: 140px; height: auto;" data-block-id="fb9241f31404be532bb46f8b96f2a9de"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text" dir="ui">
<ul>
<li>(Mac) Tower - <a href="http://www.git-tower.com" target="_blank">http://www.git-tower.com</a>
</li>
<li>(Mac) GitHub - <a href="http://mac.github.com" target="_blank">http://mac.github.com</a>
</li>
<li>(Win) GitHub - <a href="http://windows.github.com" target="_blank">http://windows.github.com</a>
</li>
<li>(Mac, Win) SourceTree - <a href="https://www.sourcetreeapp.com/" target="_blank">https://www.sourcetreeapp.com/</a>
</li>
<li>(Linux) gitg - <a href="https://wiki.gnome.org/Apps/Gitg/" target="_blank">https://wiki.gnome.org/Apps/Gitg/</a>
</li>
</ul>
<p>Good list of GUI apps:</p>
<ul>
<li><a href="http://git-scm.com/downloads/guis" target="_blank">http://git-scm.com/downloads/guis</a></li>
<li><a href="https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools" target="_blank">https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools</a></li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 190px; height: auto;" data-block-id="a439661f78388c558f790a71ba51d4a1"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text">
<h1>Demo of Git GUI</h1>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 287px; height: auto;" data-block-id="f6d990687901b8d812b6f7f4653c8949"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Subtitle">
<h2>SourceTree</h2>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 43px; height: auto;" data-block-id="95486536c5cb20fc34f284688b8a6358"><div class="sl-block-content" data-placeholder-tag="h2" data-placeholder-text="Title Text">
<h2>Further reading</h2>
</div></div>
<div class="sl-block" data-block-type="text" style="width: 960px; left: 0px; top: 139px; height: auto;" data-block-id="618b27e63644f2076d71ac76c85bfaf9"><div class="sl-block-content" data-placeholder-tag="p" data-placeholder-text="Text">
<ul>
<li>Git Pro book - <a href="http://git-scm.com/" target="_blank">http://git-scm.com/</a>
</li>
<li>Git Immersion tutorial - <a href="http://gitimmersion.com/" target="_blank">http://gitimmersion.com/</a>
</li>
<li>Try Git - <a href="https://try.github.io/" target="_blank">https://try.github.io/</a>
</li>
<li>Learn Git branching - <a href="http://pcottle.github.io/learnGitBranching/" target="_blank">http://pcottle.github.io/learnGitBranching/</a>
</li>
<li>Git Tower - <a href="http://www.git-tower.com/learn/git/ebook/" target="_blank">http://www.git-tower.com/learn/git/ebook/</a>
</li>
<li>
<span>Getting started with GitHub</span> - <a href="https://www.youtube.com/watch?v=TAObtTxBUzk" target="_blank">https://www.youtube.com/watch?v=TAObtTxBUzk</a>
</li>
<li>Good advice about Git Style - <a href="https://github.com/agis-/git-style-guide" target="_blank">https://github.com/agis-/git-style-guide</a>
</li>
</ul>
</div></div></section><section><div class="sl-block" data-block-type="text" style="width: 800px; left: 80px; top: 270px; height: auto;" data-block-id="571d8e9d52596058465f4433b31041b4"><div class="sl-block-content" data-placeholder-tag="h1" data-placeholder-text="Title Text" style="z-index: 10;">
<h1>Questions?</h1>
</div></div>
</section></section>
</div>
</div>
<script>
var SLConfig = {"deck": {"id":465562,"slug":"getting-git","title":"Getting Git","description":"Learning Git and GitHub","visibility":"self","published_at":null,"sanitize_messages":null,"thumbnail_url":"https://s3.amazonaws.com/media-p.slid.es/thumbnails/secure/c2c530/decks.jpg","view_count":10,"user":{"id":105368,"username":"racku","name":"Rackspace University","description":"","thumbnail_url":"https://www.gravatar.com/avatar/4fdd35b37f5a9854774386e628b420fe?s=140\u0026d=https%3A%2F%2Fs3.amazonaws.com%2Fstatic.slid.es%2Fimages%2Fdefault-profile-picture.png","pro":true,"enterprise":false,"enterprise_manager":false,"settings":{"id":245,"present_controls":true,"present_upsizing":true,"present_notes":true},"registered":true},"background_transition":"slide","transition":"slide","theme_id":null,"theme_font":"sketch","theme_color":"silver-green","auto_slide_interval":0,"comments_enabled":true,"forking_enabled":false,"rolling_links":false,"center":false,"should_loop":false,"share_notes":false,"slide_number":true,"rtl":false,"version":2,"notes":{}}};
SLConfig.current_user = {
name: "Rackspace University",
username: "racku",
pro: true
};
</script>
<script src="lib/head.min.js"></script>
<script src="lib/reveal.min.js"></script>
<script>
// Make Slides speaker notes available in the reveal.js speaker view
if( SLConfig.deck.notes ) {
[].forEach.call( document.querySelectorAll( '.reveal .slides section' ), function( slide ) {
var value = SLConfig.deck.notes[ slide.getAttribute( 'data-id' ) ];
if( value && typeof value === 'string' ) {
slide.setAttribute( 'data-notes', value );
}
} );
}
Reveal.initialize({
controls: true,
progress: true,
history: true,
mouseWheel: false,
showNotes: SLConfig.deck.share_notes,
slideNumber: SLConfig.deck.slide_number,
autoSlide: SLConfig.deck.auto_slide_interval || 0,
autoSlideStoppable: true,
rolling_links: SLConfig.deck.rolling_links || true,
center: SLConfig.deck.center || false,
loop: SLConfig.deck.should_loop || false,
rtl: SLConfig.deck.rtl || false,
transition: SLConfig.deck.transition,
backgroundTransition: SLConfig.deck.background_transition,
maxScale: 2,
dependencies: [
{ src: 'lib/reveal-plugins/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'lib/reveal-plugins/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'lib/reveal-plugins/highlight/highlight.js', async: true, callback: function() { hljs.initHighlighting(); hljs.initHighlightingOnLoad(); } },
{ src: 'lib/reveal-plugins/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>