Skip to content

Commit 3f09e63

Browse files
#87 Adds in branches and forks to the glossary and a terminology challenge
* Adds in branches and forks to the glossary and a terminology challenge * Adds suggestion re naming of remotes with forks
1 parent 3234b88 commit 3f09e63

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

episodes/02-branching.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ merged onto the `develop` and `main` branches.
292292
For repositories where collaborators are a small and trusted group the Feature Branch
293293
model is normally sufficient.
294294

295-
A Forking model is preferable if:
295+
A Forking model may be preferable if:
296296

297297
- There are more collaborators, because the number of branches may become unwieldy.
298298
- There are external collaborators whose contribution is valued,
@@ -309,6 +309,40 @@ You can find more information using the links below:
309309
- [From Novice to Pro: Understanding Git Branching Strategies, GitProtect](https://gitprotect.io/blog/from-novice-to-pro-understanding-git-branching-strategies/)
310310
- [What is a Git workflow?, GitLab](https://about.gitlab.com/topics/version-control/what-is-git-workflow/#forking-git-workflow)
311311

312+
::::::::::::::::::::::::::::::::::::::: challenge
313+
314+
## Terminology
315+
316+
Use the glossary to explain the differences between the following:
317+
318+
- A branch
319+
- A remote
320+
- A fork
321+
322+
::::::::::::::: solution
323+
324+
## Solution
325+
326+
Learners are often confused by the difference
327+
between branches, remotes, and forks.
328+
329+
- Branches are pointers to commits in a repository.
330+
A repository will have multiple branches where
331+
developers can work on features in parallel.
332+
- Remotes are **links** to other repositories.
333+
These remotes usually link to repositories on
334+
cloud platforms such as GitHub.
335+
A repository typically has one or more remotes,
336+
with the first called **origin**.
337+
- A fork is a copy of a repository created on GitHub.
338+
When linking your local repository your fork becomes
339+
the origin remote. The original repository you forked from
340+
becomes the upstream remote.
341+
342+
:::::::::::::::::::::::::
343+
344+
::::::::::::::::::::::::::::::::::::::::::::::::::
345+
312346
:::::::::::::::::::::::::::::::::::::::: keypoints
313347

314348
- A clearly communicated branching model helps developers.

learners/reference.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ title: 'Git Cheatsheets for Quick Reference'
1313

1414
## Glossary
1515

16+
[branch]{#branch}
17+
: A [branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)
18+
is a pointer to a [commit](#commit).
19+
When you want to develop new changes
20+
you create a branch.
21+
The default branch in GitHub is `main`.
22+
1623
[changeset]{#changeset}
1724
: A group of changes to one or more files that are or will be added
1825
to a single [commit](#commit) in a [version control](#version-control)
@@ -31,6 +38,13 @@ that is incompatible with changes made by other users.
3138
Helping users [resolve](#resolve) conflicts
3239
is one of version control's major tasks.
3340

41+
[fork]{#fork}
42+
: A GitHub [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
43+
is a copy of a [repository](#repository).
44+
It is used to develop changes freely without
45+
affecting the original project repository, or
46+
when you don't have write access on the original repository.
47+
3448
[HTTP]{#http}
3549
: The Hypertext Transfer [Protocol](#protocol) used for sharing web pages and other data
3650
on the World Wide Web.
@@ -77,5 +91,3 @@ small.
7791
Each set of changes creates a new [commit](#commit) of the files;
7892
the version control system allows users to recover old commits reliably,
7993
and helps manage conflicting changes made by different users.
80-
81-

0 commit comments

Comments
 (0)