← All eight figures

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.

DocumentFigureSubject
stagingFigure 1The working directory, the staging area, and the commit
branch-and-mergeFigure 2Commits, branches, and merges
cloneFigure 3Clone, and tracking branches
remotesFigure 4Push, fetch, and pull
conflictsFigure 5Conflicts, and how to resolve them
rebaseFigure 6Rebase
pull-requestFigure 7Pull requests
tagsFigure 8Tags

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.