Git and GitHub
These documents show the primary words of git and GitHub. Each document agrees with one figure. Open a figure and read its document together.
| Document | Figure | Subject |
|---|---|---|
| staging | Figure 1 | The working directory, the staging area, and the commit |
| branch-and-merge | Figure 2 | Commits, branches, and merges |
| clone | Figure 3 | Clone, and tracking branches |
| remotes | Figure 4 | Push, fetch, and pull |
| conflicts | Figure 5 | Conflicts, and how to resolve them |
| rebase | Figure 6 | Rebase |
| pull-request | Figure 7 | Pull requests |
| tags | Figure 8 | Tags |
The figures are HTML documents in this repository. Open the landing page in a browser, then select a figure. The control bar at the top moves between the figures. The control at the right changes the page between the light theme and the dark theme.
The primary rule
A git repository is a graph of commits. Each commit points to the commit before it. A branch is a name for one point in the graph. Most git commands move a name or make a commit.
The model in the figures
The figures use a railway as the model. A commit is a wagon. A branch is a road. A merge is a junction.
Technical names in these documents
These documents use the usual terms of git as technical names. The technical names are commit, branch, merge, remote, rebase, and pull request. These documents also use the names of the parts of the figures as technical names. The technical names are wagon, road, junction, trolley, gantry, lever, desk, and barrier.