-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
411 lines (304 loc) · 10.7 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Terminal and Git 101</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-background="#F5E431">
<h1>Terminal and Git 101</h1>
<h3>A primer for <br/>productive web development</h3>
<p>
<small></small>
<small>Made with ♥ by <a href="https://github.com/VCUarts/" target="_blank">VCUarts</a></small><br/>
<small>Contributers: <a href="http://luetkemj.com">Mark Luetke</a> & <a href="http://codywhitby.net/">Cody Whitby</a></small>
</p>
</section>
<section data-background="#85FC81">
<h2>Terminal</h2>
</section>
<section data-background="#85FC81">
<h2>What is a terminal?</h2>
<p>
A terminal is an interface for typing text based commands.
</p>
</section>
<section data-background="#85FC81">
<h2>Why use a terminal?</h2>
<p>
Efficiency, Efficiency, Efficiency.
</p>
<p>Most modern professional web development tools are command line based. Not knowing even the most basic terminal commands is a serious handicap.</p>
<p>It's not hard.</p>
</section>
<section data-background="#85FC81">
<h2>But won't the universe implode if I screw up a command???</h2>
<p>
Everything is going to be fine.
</p>
</section>
<section data-background="#85FC81">
<h2>Prerequisites</h2>
<p>X-Code must be installed. <a href="https://itunes.apple.com/us/app/xcode/id497799835?mt=12" target="_blank">Available for free in the App Store.</a></p>
</section>
<section data-background="#85FC81">
<h2>Basic commands</h2>
<pre><code data-trim contenteditable>
$ cd
$ ls
$ mkdir
$ touch
$ open
</code></pre>
</section>
<section data-background="#85FC81">
<h2>cd</h2>
<p>Change directory</p>
<pre><code data-trim contenteditable>
#change to root directory
$ cd ~
</code></pre>
<pre><code data-trim contenteditable>
#change to myproject directory
$ cd github/projects/myproject
</code></pre>
<pre><code data-trim contenteditable>
#move back a single directory
$ cd ..
</code></pre>
<pre><code data-trim contenteditable>
#move back three directories
$ cd ../../../
</code></pre>
<small>Tip: use TAB to autocomplete</small>
</section>
<section data-background="#85FC81">
<h2>ls</h2>
<p>List directory contents</p>
<pre><code data-trim contenteditable>
$ ls
</code></pre>
<pre><code data-trim contenteditable>
aDirectory anotherFile.txt aPic.jpg
myFile.txt file.txt
</code></pre>
</section>
<section data-background="#85FC81">
<h2>mkdir</h2>
<p>create a new directory</p>
<pre><code data-trim contenteditable>
#create mydirectory within the current directory
$ mkdir mydirectory
</code></pre>
</section>
<section data-background="#85FC81">
<h2>touch</h2>
<p>create a new file</p>
<pre><code data-trim contenteditable>
#create mynewfile.txt within the current directory
$ mkdir touch mynewfile.txt
</code></pre>
</section>
<section data-background="#85FC81">
<h2>open</h2>
<p>open a file or directory</p>
<pre><code data-trim contenteditable>
#open the current directory in finder
$ open .
</code></pre>
<pre><code data-trim contenteditable>
#open textfile.txt with it's the default program
$ open textfile.txt
</code></pre>
<pre><code data-trim contenteditable>
#open textfile.txt with pages
$ open -a pages textfile.txt
</code></pre>
</section>
<section data-background="#85FC81">
<h2>Further Study</h2>
<p><a href="https://github.com/0nn0/terminal-mac-cheatsheet/wiki/Terminal-Cheatsheet-for-Mac-%28-basics-%29" target="_blank">Terminal Cheatsheet for Mac ( basics )</a></p>
<p>There are many more commands that exist, so many that it is possible to work exclusively from the command line.</p>
<small>Like many things in web development, this is yet another very deep rabbit hole...</small>
</section>
<section data-background="#befefe">
<h2>Git</h2>
</section>
<section data-background="#befefe">
<h2>What is Git</h2>
<p>Git is an open source program for tracking changes in files</p>
</section>
<section data-background="#befefe">
<h2>Why should I use Git?</h2>
<p>Git saves the entire history of a project allowing you to restore to any point. It pretty much makes efficient collaborative programming possible and you WILL need to understand it if you do any sort of professional development work with a team.</p>
</section>
<section data-background="#befefe">
<h2>Why should I use Git in the terminal instead of an app?</h2>
<p>Efficiency, Efficiency, Efficiency. Professional developers live in their terminal and the command line is the native implementation of Git.</p>
</section>
<section data-background="#befefe">
<h2>Basic Git Commands</h2>
<pre><code data-trim contenteditable>
$ git init
$ git status
$ git add
$ git commit
$ git fetch
$ git pull
$ git push
</code></pre>
</section>
<section data-background="#befefe">
<h2>init</h2>
<p>creates a .git directory</p>
<pre><code data-trim contenteditable>
$ git init
</code></pre>
</section>
<section data-background="#befefe">
<h2>status</h2>
<p>displays the status of our repo, any changes, new files, deleted files, etc.</p>
<pre><code data-trim contenteditable>
$ git status
</code></pre>
</section>
<section data-background="#befefe">
<h2>add</h2>
<p>tell git to track new files</p>
<pre><code data-trim contenteditable>
$ git add filename.txt
$ git add .
</code></pre>
</section>
<section data-background="#befefe">
<h2>commit</h2>
<p>take a snapshot of changes and new files</p>
<pre><code data-trim contenteditable>
$ git commit
$ git commit -m "message describing the changes"
</code></pre>
</section>
<section data-background="#befefe">
<h2>fetch</h2>
<p>check a remote repo for changes</p>
<pre><code data-trim contenteditable>
$ git fetch
</code></pre>
</section>
<section data-background="#befefe">
<h2>pull</h2>
<p>pull down any changes from a remote and apply them to the local project</p>
<pre><code data-trim contenteditable>
$ git pull
</code></pre>
</section>
<section data-background="#befefe">
<h2>push</h2>
<p>add any commits to the remote repo</p>
<pre><code data-trim contenteditable>
$ git push
</code></pre>
</section>
<section data-background="#befefe">
<h2>Using Git in a Existing Project</h2>
<pre><code data-trim contenteditable>
$ git init
</code></pre>
<pre><code data-trim contenteditable>
$ git add .
$ git commit -m "initial project commit"
</code></pre>
</section>
<section data-background="#befefe">
<h2>Pushing a Repo to GitHub</h2>
<p>First you must create a new project on GitHub</p>
<pre><code data-trim contenteditable>
$ git remote add origin http://yournewprojecturl.com/something.git
$ git push origin master
</code></pre>
</section>
<section data-background="#befefe">
<h2>Pushing changes to GitHub</h2>
<p>After making changes to a project</p>
<pre><code data-trim contenteditable>
$ git status
$ git add .
$ git commit -m "message about what we changed"
$ git push
</code></pre>
</section>
<section data-background="#befefe">
<h2>Cloning a Existing Project</h2>
<p>Pull down a project to use locally</p>
<pre><code data-trim contenteditable>
$ cd directory/you/want
$ git clone https://github.com/user/project.git
# or clone into a folder with a different name
$ git clone https://github.com/user/project.git new-folder
</code></pre>
</section>
<section data-background="#befefe">
<h2>Futher Study</h2>
<p><a href="https://try.github.io/levels/1/challenges/1" target="_blank">try.github.io</a></p>
<p><a href="http://pcottle.github.io/learnGitBranching/" target="_blank">Learn Git Branching</a></p>
<p><a href="https://github.com/k88hudson/git-flight-rules" target="_blank">git flight rules</a></p>
<p><a href="" target="_blank"></a></p>
<p><a href="" target="_blank"></a></p>
<p><a href="" target="_blank"></a></p>
</section>
<section data-background="#F5E431">
<h1>Thanks!</h1>
<p>
<small>Made with ♥ by <a href="https://github.com/VCUarts/" target="_blank">VCUarts</a></small><br/>
<small>Contributers: <a href="http://luetkemj.com">Mark Luetke</a> & <a href="http://codywhitby.net/">Cody Whitby</a></small>
</p>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.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, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>