forked from gdipgh/intro-to-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
604 lines (523 loc) · 18.9 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
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Intro to Version Control Using Git</title>
<meta name="description" content="An introduction to git and github for girl develop it pittsburgh">
<meta name="author" content="Jeremy Flores and Lindsey Bieda">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/lindsey.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="gdi"><p>pittsburgh</p></div>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-state="activity">
<h2>Download Class Materials</h2>
<p><a href="http://bit.ly/WMYSB4" id="download-link">http://bit.ly/WMYSB4</a></p>
</section>
<section>
<h2>Intro to Version Control Using Git</h2>
<h4>Lindsey Bieda</h4>
</section>
<section data-state="activity">
<h2>Introductions</h2>
<img src="images/intro.png" alt="introduction">
</section>
<section data-state="activity">
<h2>Please ask questions.</h2>
<img src="images/question.png" alt="questions">
</section>
<section>
<h2>Goals for the class</h2>
<ul>
<li>Basic understanding of what version control is</li>
<li>Basic understanding of git is and how to use it</li>
<li>Knowledge of github and what it provides us</li>
</ul>
</section>
<section>
<h2>Version Control System</h2>
<p>
A tool that assists in the management of changes to documents.
</p>
</section>
<section>
<h2>What does that mean?</h2>
<p>
<ul>
<li>You can make changes to documents and save those changes.</li>
<li>You can undo changes</li>
<li>You can include changes from other people*</li>
<li>You can multiple change-sets simultaneously*</li>
</ul>
</p>
</section>
<section>
<h2>Not just for programming</h2>
<p>
Anytime you are working on any set of documents that you are making changes to and want to save the state of version
control is extremely useful.
</p>
</section>
<section>
<h2><a href="http://git-scm.com/">Git</a></h2>
<p>
A <strong>distributed</strong> version control system.
</p>
<small>Distributed, in this case, basically means that we can have the same thing existing in multiple locations</small>
<img src="images/Git-Logo.png" alt="git">
<img src="images/peer-to-peer.png" alt="distrubuted peer to peer network">
</section>
<section>
<h2><a href="http://github.com/">GitHub</a></h2>
<p>
A web service for programming projects that use Git.
</p>
<img src="images/GitHub_Logo.png" alt="github">
</section>
<section>
<h2>Many Open Source projects hosted here</h2>
<img src="images/opensource.png" alt="open source project on github">
</section>
<section>
<h2>Collaboration</h2>
<p>
<ul>
<li>Git makes collaboration easy</li>
<li>GitHub makes collaboration even easier</li>
<li>Easy to copy existing code, update, and share updates with others</li>
</ul>
</p>
<img src="images/hardcore-forking.gif" "forking a repo">
</section>
<section data-state="activity">
<h1>Tool Check</h1>
<h3>GitHub</h3>
<p>
<ul>
<li>If you haven't already create a GitHub account at <a href="http://github.com">github.com</a></li>
<li>Login to your account</li>
<li>Set your avatar at <a href="http://en.gravatar.com/">gravatar.com</a></li>
<li>View your GitHub profile page: <br>
http://github.com/<strong>your_username</strong></li>
</ul>
<img src="images/sample-avatar.png" alt="sample avatar of a sea otter licking glass">
</p>
<small>note: for gravatar use the same email your signed up for github with.</small>
</section>
<section>
<h2>GitHub for Mac/Windows</h2>
<p>
A program that lets us <strong>easily</strong> use git and github.
</p>
<img src="images/Octocat.png" alt="octocat">
</section>
<section data-state="activity">
<h1>Tool Check</h1>
<h3>GitHub for Mac/Windows</h3>
<ul>
<li>If you haven't already download GitHub for <a href="http://mac.github.com/">Mac</a>/
<a href="http://windows.github.com/">Windows</a> and install</li>
<li>Open GitHub for Mac/Windows</li>
<li>Login to your GitHub Account</li>
</ul>
</section>
<section>
<section>
<h2>GitHub App Anatomy</h2>
<img src="images/main-anatomy-windows.png" alt="main anatomy windows">
</section>
<section>
<h2>GitHub App Anatomy</h2>
<img src="images/main-anatomy-mac.png" alt="main anatomy windows">
</section>
<section>
<h2>GitHub App Anatomy</h2>
<img src="images/inside-repo-anatomy-windows.png" alt="repo anatomy windows">
</section>
<section>
<h2>GitHub App Anatomy</h2>
<img src="images/inside-repo-anatomy-mac.png" alt="repo anatomy windows">
</section>
</section>
<section>
<h2>Repository</h2>
<h4>Where our files live</h4>
<p>
Also contains:
<ul>
<li>A record of the changes made to those files</li>
<li>Who made those changes</li>
<li>When those changes were made</li>
</ul>
</p>
<small>Also referred to as a repo for short.</small>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Our first repository</h3>
<ul>
<li>Open the GitHub application</li>
<li>Click "add" to create a new repo</li>
<li>Give it a name and a description <br>
(e.g. "My first repo")</li>
</ul>
</section>
<section>
<h2>Commit</h2>
<p>
To save the state of a single or collection of changes.
</p>
</section>
<section>
<h2>How to make a commit with git</h2>
<p>
Whenever you make a change inside the folder where your repo is the GitHub app notices and will ask for
a commit message in order to save the changes.
</p>
<aside class="notes">
Demonstrate this with the GitHub app.
</aside>
</section>
<section>
<h2>Commit Message</h2>
<p>
A note that describes what the commit is about.
</p>
</section>
<section>
<h2>Bad Commit Messages</h2>
<p>
<ul>
<li class="fragment">Whoops</li>
<li class="fragment">Fixed a thing</li>
<li class="fragment">I have no idea</li>
<li class="fragment">Everything works now</li>
<li class="fragment">I am so angry at the universe right now</li>
</ul>
</p>
</section>
<section>
<h2>Better Commit Messages</h2>
<p>
<ul>
<li class="fragment">Added the missing read-me file</li>
<li class="fragment">Fix: Extranous semi-colon removed</li>
<li class="fragment">Moved the cat-pix folder inside the images folder</li>
<li class="fragment">Resolved the problem where content would not display</li>
<li class="fragment">Added a hack in the CSS to fix the bug with IE</li>
</ul>
</p>
</section>
<section>
<h2>Things to keep in mind</h2>
<p>
<ul>
<li>Avoid being vague</li>
<li>Realize that not only are you communicating with future-you, but potientially others</li>
<li>When you can, focus on why you did something not what you did</li>
</ul>
</p>
<aside class="notes">
Look at commit messages for https://github.com/LindseyB/intro-to-git
</aside>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>First commit</h3>
<ul>
<li>Open the folder for your repo from the GitHub app</li>
<li>Create a new file named "README.md" inside the folder</li>
<li>Commit your changes from the GitHub app <br>
Make sure to provide a good description for your commit</li>
</ul>
</section>
<section>
<h2>Syncing</h2>
<p>In the command-line world known as pushing</p>
<p>Takes the changes you made on your computer and sends them off to the GitHub website</p>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Sync your changes</h3>
<ul>
<li>Open the GitHub app</li>
<li>Click on sync to send your changes to the GitHub website</li>
<li>View the changes on GitHub: <br>
https://github.com/<strong>[username]</strong>/<strong>[repo name]</strong></li>
</ul>
</section>
<section>
<h2>A quick note on READMEs</h2>
<p>README files are generally provided with software or other files that provides information for the person opening it.</p>
<p>They can contain:
<ul>
<li>How to use a piece of software</li>
<li>Who made the software</li>
<li>Any bugs in a chunk of software</li>
</ul>
</p>
<small>According to the <a href="http://catb.org/jargon/html/index.html">jargon file</a> the name comes from Lewis Carroll's <em>Alice's Adventures In Wonderland</em>
when she encounters "Eat Me" and "Drink Me"</small>
</section>
<section>
<h2>READMEs on GitHub</h2>
<p>
<ul>
<li>Always will display on the main page on the repo</li>
<li>Are important to those viewing the project so they can see what it is about and how to use it</li>
<li>Supports the ability to make the content appear with styling using MarkDown</li>
<li>Example: <a href="https://github.com/hakimel/reveal.js#revealjs">reveal.js README</a></li>
</ul>
</p>
</section>
<section>
<h2>MarkDown</h2>
<p>
An extremely lightweight <a href="http://en.wikipedia.org/wiki/Markup_language">markup language</a>.
</p>
<small><a href="http://daringfireball.net/projects/markdown/basics">Reference</a></small>
</section>
<section>
<h2>MarkDown Example</h2>
<pre><code contenteditable># Title
* item 1
* item 2
* item 3
*italic text* __bold text__</code></pre>
<img src="images/markdown.png" alt="markdown result">
</section>
<section>
<h2>You Don't Have to Use MarkDown</h2>
<p>Plain text will still display perfectly fine</p>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Add some content to your README</h3>
<ul>
<li>Open "README.md" in a text editor</li>
<li>Add any content that you desire with or without MarkDown</li>
<li>Commit your changes from the GitHub app <br>
Make sure to provide a good description for your commit</li>
<li>Sync your changes</li>
<li>View your new README on the GitHub website <br>
https://github.com/<strong>[username]</strong>/<strong>[repo name]</strong></li>
</ul>
</section>
<section>
<h2>Commits don't need all files</h2>
<p>We can tell git that we only want to commit changes to some files rather than all.</p>
</section>
<section>
<h3>When do we want to only commit some files?</h3>
<p>
<ul>
<li>If we don't want to save our changes in other files.</li>
<li>If the other files are in some broken state.</li>
<li>If the other files are still "works in progress".</li>
</ul>
</section>
<section>
<h2>How do we commit only files we want in the GitHub app?</h2>
<p>The GitHub app uses checkboxes to let us select which files we want to include as part of our commit.</p>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Commit only one file</h3>
<ul>
<li>Create "NewFile.md"</li>
<li>Make some changes in "README.md"</li>
<li>Commit your changes from the GitHub app and be sure to only select "NewFile.md".</li>
<li>When you click on the commit only this file will show up in the list of changes.</li>
</ul>
</section>
<section>
<h2>Branch</h2>
<p>
<ul>
<li>Where your <strong>changes</strong> live.</li>
<li>By default you start out in the <strong>master</strong> branch</li>
<li>Difference branches are like parallel universes: they may be very different from one another
or very similar and they exist at the same time.</li>
</ul>
<aside class="notes">
look at https://github.com/rails/rails
</aside>
</p>
<img src="images/currentbranch.png" alt="current branch">
</section>
<section>
<h2>Creating a new branch</h2>
<p>
When we create a new branch we keep all the old files as is, but are able to make changes that don't affect the <strong>master</strong> branch.
</p>
<img src="images/newbranch.png" alt="new branch">
</section>
<section>
<h2>Why would we do this?</h2>
<p>
<ul>
<li>Working on code we are unsure is correct.<br>
(e.g. bug fixes)</li>
<li>Working on a completely new version of something.</li>
<li>Working on a specific feature we want to add.</li>
</ul>
</p>
</section>
<section>
<h2>How do we create a new branch in the GitHub app?</h2>
<aside class="notes">
Demonstrate this with the GitHub app.
</aside>
</section>
<section>
<h2>How do we view a different branch on GitHub.com?</h2>
<aside class="notes">
Demonstrate this with https://github.com/rails/rails
</aside>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Creating a new branch</h3>
<ul>
<li>Create a new branch named "song"</li>
<li>Add any song lyrics to your "README.md" file</li>
<li>Commit your changes</li>
<li>Sync your changes</li>
<li>View your README on the GitHub website <br>
https://github.com/<strong>[username]</strong>/<strong>[repo name]</strong>
<small>note: it will still look the same</small>
</li>
<li>Change branches on the github website and now look at your README.md file.</li>
</ul>
</section>
<section>
<h2>Merging</h2>
<p>
When we take the changes of one branch and pull them into a second branch.
</p>
<img src="images/merge.png" alt="merge">
</section>
<section>
<h2>When do we want to merge?</h2>
<p>
<ul>
<li>When we have tested our new bug fixes and want to use it.</li>
<li>When we are ready to go live with new features.</li>
<li>When we are ready to go live with a new version.</li>
<li>When we want to combine two new features together.</li>
</ul>
</p>
</section>
<section>
<h2>How do we merge in the github app</h2>
<aside class="notes">
Demonstrate this with the GitHub app.
</aside>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Merging a branch</h3>
<ul>
<li>Merge the <strong>song</strong> branch into the <strong>master</strong> branch</li>
<li>Commit your changes</li>
<li>Sync your changes</li>
<li>View your README on the GitHub website <br>
https://github.com/<strong>[username]</strong>/<strong>[repo name]</strong>
<small>note: it should now have your song lyrics</small>
</li>
</ul>
</section>
<section>
<h2>Rolling back commits</h2>
<p>Sometimes you want to undo a commit, but still <strong>keep your changes</strong>.</p>
</section>
<section>
<h2>How do we roll back in the github app?</h2>
<aside class="notes">
Demonstrate this with the GitHub app.
</aside>
</section>
<section>
<h2>Reverting a commit</h2>
<p>Sometimes you want to completely undo a commit.</p>
<img src="images/undo-button.png" alt="undo button">
</section>
<section>
<h2>How do we revert in the github app?</h2>
<aside class="notes">
Demonstrate this with the GitHub app.
</aside>
</section>
<section data-state="activity">
<h1>Activity</h1>
<h3>Reverting some changes</h3>
<ul>
<li>Open "README.md" and add "Changes I don't want" to it.</li>
<li>Open the GitHub app and commit your changes.</li>
<li>Now click on the commit from the list and click the revert button.</li>
<li>Notice you will now have a new commit that says "Revert..."</li>
</ul>
</section>
<section>
<h2>Further Learning</h2>
<ol>
<li><a href="http://try.github.com">Code School - Try Git</a> (command-line based tutorial)</li>
<li><a href="http://git-scm.com/documentation">Git</a>'s official documentation</li>
<li><a href="http://gitimmersion.com">Git Immersion</a> a git walkthrough from the command-line</li>
</ol>
<img src="images/bookstack.png" alt="bookstack">
</section>
<section>
<h1>THE END</h1>
<h3>Thank you!</h3>
<img src="images/octdrey-catburn.png" alt="Octdrey Catburn">
</section>
<section data-state="activity">
<h1>Bonus: Activity</h1>
<h3>Try Git Command-line</h3>
<ul>
<li>Open <a href="http://try.github.com">Code School - Try Git</a>.</li>
<li>Run through the simple exercises on the web.</li>
<li>If you have time, try it on your computer.</li>
</ul>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>