Skip to content

Commit 5a6d550

Browse files
committed
differences for PR #190
1 parent 277c53c commit 5a6d550

File tree

5 files changed

+373
-3
lines changed

5 files changed

+373
-3
lines changed

02-getting-started.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,22 @@ No commits yet
167167
nothing to commit (create/copy files and use "git add" to track)
168168
```
169169

170-
The output tells us that we are on the main branch (more on this later) and that we have nothing to commit (no
170+
The output tells us that we are on the main branch and that we have nothing to commit (no
171171
unsaved changes).
172172

173+
::::::::::::::::::::::::::::::::::::::::: callout
174+
175+
## Branches and commits
176+
177+
Commits in Git are like snapshots of our project.
178+
They are ordered into sequences, or "branches", with each commit pointing back to the one before it in the branch.
179+
Git keeps track of the last commit in each branch with a special label;
180+
in this lesson we mostly use one branch with the label "main".
181+
182+
![](fig/git-branch.svg){alt='The label ‘main’ points to commit c2; c2 points to its parent c1, which points to c0.'}
183+
184+
::::::::::::::::::::::::::::::::::::::::::::::::::
185+
173186
### Two steps: Adding and committing
174187

175188
We will now create and save our first project file. This is a two-step process. First, we **add** any files for which

05-github-pages.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ it's more practical to grant everyone access to commit directly instead.
133133

134134
::::::::::::::::::::::::::::::::::::::::::::::::::
135135

136+
::::::::::::::::::::::::::::::::::::::::: callout
137+
138+
## Branching and merging
139+
140+
Branches get their name because you can create a new one (say, "patch")
141+
that splits off from an existing one like "main",
142+
allowing different sets of changes to be made in parallel.
143+
Later on, Git can take the changes from "patch" and merge (copy) them into the "main" branch.
144+
In the last challenge, GitHub did all this for us in the background.
145+
146+
![](fig/git-branches.svg){alt='The label ‘main’ points to commit c5; arrows point from c5 to c3 to c1 to c0. The label ‘patch’ points to commit c4; arrows point from c4 to c2 to c1. A dotted arrow points from c5 to c4.'}
147+
148+
::::::::::::::::::::::::::::::::::::::::::::::::::
149+
136150
:::::::::::::::::::::::::::::::::::::::: challenge
137151

138152
## Optional challenge: Contributing to a page owned by someone else (slightly more complicated way)

fig/git-branch.svg

Lines changed: 129 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)