Reference
Glossary
One word per idea. Every lesson uses these terms and avoids the aliases in italics.
The core model
- Commit
- A saved snapshot of the whole project, identified by a hash (e.g.
a1f3c2e), that points back to its parent commit(s). Avoid: save, version. - Branch
- A lightweight, movable pointer to one commit; when you commit on a branch, the pointer moves forward to the new commit (Pro Git 3.1). Avoid: copy, fork (a fork is a whole copy of a repository).
- HEAD
- Git's pointer to the branch you are currently on — the branch your next commit will move.
- Default branch (main)
- The branch GitHub shows visitors, clones check out, and pull requests target by default; GitHub names it
main(GitHub Docs). Avoid: master (older Git default), trunk. - Feature branch
- A short-lived branch holding one self-contained change, merged into
mainwhen done. Avoid: topic branch, dev branch. - Working tree
- The files you see and edit on disk; switching branches rewrites the working tree to match the branch's commit. Avoid: workspace, local copy.
Combining work
- Merge
- Bringing the commits of one branch into the current branch.
- Fast-forward merge
- A merge where the current branch has not moved since the other branch started, so Git simply slides the pointer forward — no new commit.
- Merge commit
- A commit with two parents that joins two diverged branches.
- Merge conflict
- A merge Git cannot finish automatically because both branches changed the same lines differently; Git marks the spot with
<<<<<<<,=======,>>>>>>>. - Squash merge
- Merging a pull request by combining all its commits into one new commit on the base branch.
- Three-dot diff
git diff main...feature: only the changes made onfeaturesince it split frommain— what a pull request shows.
Judging a branch
- Merge base
- The most recent commit that two branches share: the point where one split from the other.
git merge-base main featureprints it (git merge-base). Avoid: fork point (Git uses that name for something else). - Two-dot diff
git diff main..feature: how the tip ofmainand the tip offeaturediffer right now, the same asgit diff main feature. Work that landed onmainafter the split shows up reversed.- Stale branch
- A branch whose merge base with
mainis no longer the tip ofmain, becausemainmoved after the branch split or was last updated. Its review and test results describe an oldermain. Avoid: outdated, old branch. GitHub says "behind" or "not up to date with the base branch". - Baseline
- The score you subtract from a new score to see what changed. To see what a branch did, take the baseline at the merge base. Avoid: reference score, control.
Remotes and GitHub
- Remote (origin)
- Another copy of the repository, usually on GitHub;
originis just the default namegit clonegives it. - Remote-tracking branch
- A read-only local pointer such as
origin/mainrecording where a branch was on the remote the last time you talked to it. - Upstream
- The remote branch a local branch is linked to, so plain
git pushandgit pullknow where to go; set withgit push -u. Avoid: tracking target. - Pull request (PR)
- A GitHub proposal to merge a head branch into a base branch, with a diff, discussion, and checks.
- Head branch / base branch
- In a pull request, the head branch holds the proposed changes; the base branch (usually
main) receives them. - Draft pull request
- A pull request marked work-in-progress; it cannot be merged until marked ready for review.
CI/CD
- Mainline
- The single shared branch (
main) that represents the current state of the product (Fowler). - Continuous integration (CI)
- Merging small changes into the mainline frequently, each one verified by an automated build and tests.
- Continuous deployment (CD)
- Automatically building, testing, and publishing every change that lands on the mainline.
- Workflow
- A GitHub Actions automation defined in
.github/workflows/*.yml, triggered by events such aspushorpull_request. Avoid: pipeline (fine elsewhere, but not GitHub's term). - Status check
- A pass/fail result (often a workflow job) reported on a commit and shown on the pull request.
- Branch protection
- Repository rules (protection rules or rulesets) that block changes to a branch unless conditions are met — e.g. a pull request with passing status checks.
Agentic coding
- Agent branch
- In this course: a feature branch created for one Claude Code task, so the agent's commits are isolated and reviewable as a pull request.
- Worktree
- An extra working tree attached to the same repository, with its own branch checked out, so two sessions can work side by side (git worktree).
- Checkpoint
- Claude Code's automatic, session-level snapshot of files before each prompt, restorable with
/rewind; not a replacement for commits (Claude Code docs).
Name trap: Claude Code's /branch command branches the conversation, not git (Claude Code commands).