Skip to content

Commit 8adbcd8

Browse files
author
jordanmccullough
committed
Add cover slides, Markdown SVG embedding
1 parent 565a178 commit 8adbcd8

File tree

1 file changed

+60
-31
lines changed

1 file changed

+60
-31
lines changed

intermediate/beta.md

Lines changed: 60 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ layout: curriculum-beta
33
title: GitHub Intermediate
44
description: Leveraging Git and GitHub from the command line
55
---
6-
 
76

87
This curriculum will be your companion to the GitHub Intermediate class taught by the GitHub Training Team and other educational groups. In this course, you'll learn how to extensively leverage Git and GitHub from the command line.
98

109
![Git repository creation at the command line](../assets/screenshots/terminal-repo-creation.jpg)
1110

11+
{% capture slide %}
1212
### Git Configuration
13+
{% endcapture %}
14+
{% include slide-section %}
15+
16+
1317
Git is configured through name-value pairs saved in an [INI file format](http://en.wikipedia.org/wiki/INI_file). The name-value pairs can be read and written through the `git config` command.
1418

1519
Git's configuration is saved in one of three plain text files and one of three levels and is easily editable with a text editor and portable to other machines by copying the configuration files.
@@ -114,8 +118,11 @@ $ git config --[scope] color.ui auto
114118
4. If on Mac, set your line ending behavior to `core.autocrlf input`
115119
5. List out all your remaining Git configuration values.
116120

117-
121+
{% capture slide %}
118122
### Start a repository
123+
{% endcapture %}
124+
{% include slide-section %}
125+
119126
Git provides an easy way to get started versioning any prototype, prose or project with a terse command line recipe.
120127

121128
Initialize a repository and create a top level project directory:
@@ -153,7 +160,11 @@ $ git clone [url] [optional-folder-name]
153160
#### Video
154161
<iframe src="//player.vimeo.com/video/88313612" width="100%" height="350" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
155162

163+
{% capture slide %}
156164
### Versioning content
165+
{% endcapture %}
166+
{% include slide-section %}
167+
157168

158169
```shell
159170
$ git status
@@ -169,26 +180,25 @@ $ git commit -m "[your description]"
169180
```
170181

171182
#### Three stage thinking
172-
{% capture svg_path %}../assets/diagrams/commit-three-stage.svg{% endcapture %}
173-
{% include svg %}
183+
![diagram](../assets/diagrams/commit-three-stage.svg)
174184

175185
#### Commit versions
176-
{% capture svg_path %}../assets/diagrams/commit-versions.svg{% endcapture %}
177-
{% include svg %}
186+
![diagram](../assets/diagrams/commit-versions.svg)
178187

179188
#### Commit DAG
180-
{% capture svg_path %}../assets/diagrams/commit-dag.svg{% endcapture %}
181-
{% include svg %}
189+
![diagram](../assets/diagrams/commit-dag.svg)
182190

183191
#### Video
184192
<iframe src="//player.vimeo.com/video/88315552" width="100%" height="350" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
185193

186-
194+
{% capture slide %}
187195
### Review pending modifications
196+
{% endcapture %}
197+
{% include slide-section %}
198+
188199
Git advocates precision in each commit's contents and commit message. This is facilitated by easy reviewing of in-flight changes prior to describing them and making them permanent.
189200

190-
{% capture svg_path %}../assets/diagrams/diff.svg{% endcapture %}
191-
{% include svg %}
201+
![diagram](../assets/diagrams/diff.svg)
192202

193203
The simplest invocation of `diff` is the most common. It displays the difference of the files that have been modified.
194204

@@ -219,8 +229,11 @@ $ git diff [file-path]
219229
#### Video
220230
<iframe src="//player.vimeo.com/video/88315553" width="100%" height="350" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
221231

222-
232+
{% capture slide %}
223233
### Review historical changes
234+
{% endcapture %}
235+
{% include slide-section %}
236+
224237
Git can look back at the history of each commit to see when a change took place, who made the change, or what the change contained.
225238

226239
```shell
@@ -244,13 +257,15 @@ $ git log --patch --color-words
244257
#### Video
245258
<iframe src="//player.vimeo.com/video/95811891" width="100%" height="350" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
246259

247-
260+
{% capture slide %}
248261
### Local workflows
262+
{% endcapture %}
263+
{% include slide-section %}
264+
249265

250266
Organizing history:
251267

252-
{% capture svg_path %}../assets/diagrams/what-is-a-branch.svg{% endcapture %}
253-
{% include svg %}
268+
![diagram](../assets/diagrams/what-is-a-branch.svg)
254269

255270

256271
#### Branching
@@ -295,19 +310,19 @@ $ git merge [branch]
295310

296311
Merge fast-forward:
297312

298-
{% capture svg_path %}../assets/diagrams/merge-fast-forward.svg{% endcapture %}
299-
{% include svg %}
313+
![diagram](../assets/diagrams/merge-fast-forward.svg)
300314

301315
Merge recursive:
302316

303-
{% capture svg_path %}../assets/diagrams/merge-recursive.svg{% endcapture %}
304-
{% include svg %}
305-
317+
![diagram](../assets/diagrams/merge-recursive.svg)
306318

319+
{% capture slide %}
307320
### Distributed repositories
321+
{% endcapture %}
322+
{% include slide-section %}
323+
308324

309-
{% capture svg_path %}../assets/diagrams/distributed-version-control.svg{% endcapture %}
310-
{% include svg %}
325+
![diagram](../assets/diagrams/distributed-version-control.svg)
311326

312327
Git is capable of working with 0 to N remotes. 0 means the local repo only knows about the local file system, 1 represents a more traditional centralized model, and 1+N is an example of the "distributed" multi-mastered facet of a DVCS.
313328

@@ -323,11 +338,13 @@ Additional remotes (bookmarks) are added as a name-URL-value pair. The default n
323338
$ git remote add [name] [url]
324339
```
325340

326-
341+
{% capture slide %}
327342
### Remote workflows
343+
{% endcapture %}
344+
{% include slide-section %}
328345

329-
{% capture svg_path %}../assets/diagrams/fork-structure.svg{% endcapture %}
330-
{% include svg %}
346+
347+
![diagram](../assets/diagrams/fork-structure.svg)
331348

332349
Acquiring a repo:
333350

@@ -384,8 +401,7 @@ $ git fetch [url] [branch]
384401

385402
#### Sharing changes
386403

387-
{% capture svg_path %}../assets/diagrams/network.svg{% endcapture %}
388-
{% include svg %}
404+
![diagram](../assets/diagrams/network.svg)
389405

390406
A fully-specified push can indicate both the destination and contents:
391407

@@ -408,8 +424,11 @@ The most simplistic invocation of `push` leverages _tracking_ as set up by a `cl
408424
$ git push
409425
```
410426

411-
427+
{% capture slide %}
412428
### Shortcuts and custom commands
429+
{% endcapture %}
430+
{% include slide-section %}
431+
413432

414433
```shell
415434
# Shortcut to output commit history
@@ -426,12 +445,14 @@ $ git config --global alias.lol "log --graph --all --oneline --decorate"
426445
$ git config alias.s "status -s"
427446
```
428447

429-
448+
{% capture slide %}
430449
### File lifecycle
450+
{% endcapture %}
451+
{% include slide-section %}
452+
431453
Files in Git transition through a well-defined states of tracking.
432454

433-
{% capture svg_path %}../assets/diagrams/states-of-tracking.svg{% endcapture %}
434-
{% include svg %}
455+
![diagram](../assets/diagrams/states-of-tracking.svg)
435456

436457
#### Adding files
437458

@@ -484,7 +505,11 @@ $ git log --stat -M
484505
#### File similarity video
485506
<iframe src="//player.vimeo.com/video/99213354" width="100%" height="350" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
486507

508+
{% capture slide %}
487509
### Undoing changes
510+
{% endcapture %}
511+
{% include slide-section %}
512+
488513

489514
#### Revert
490515
Revert is the kindest of undo functionality. It creates a new _inverse_ commit and links back to the old one in the proposed commit message:
@@ -514,7 +539,11 @@ $ git reset --mixed [commit|branch|tag]
514539
$ git reset --hard [commit|branch|tag]
515540
```
516541

542+
{% capture slide %}
517543
### Recovering anything
544+
{% endcapture %}
545+
{% include slide-section %}
546+
518547

519548
#### Reviewing historical states
520549

0 commit comments

Comments
 (0)