Git & Version Control
Vocabulary for Git workflows, branching strategies, history rewriting, and collaboration patterns.
- Commit /kəˈmɪt/
A snapshot of staged changes saved to the repository history, identified by a unique SHA hash.
"Each commit should represent a single logical change — atomic commits make it easier to revert specific bugs."
- Branch /brɑːntʃ/
A lightweight movable pointer to a commit that lets you work on features or fixes in isolation from the main codebase.
"I created a feature branch for the OAuth integration so my changes don't affect the main branch during development."
- Merge /mɜːdʒ/
Incorporating changes from one branch into another, creating a merge commit that preserves both histories.
"After code review approval we merge the feature branch into main — the merge commit records when and what was integrated."
- Rebase /riːˈbeɪs/
Moving or replaying commits from one branch onto another base, resulting in a linear history without merge commits.
"Before opening the PR I rebase onto main so my branch has the latest changes and the history is clean and linear."
- Cherry-pick /ˈtʃeri pɪk/
Applying a specific commit from one branch to another without merging the entire branch history.
"The hotfix was cherry-picked from main into the release branch so we could ship the critical bug fix without taking other changes."
- Stash /stæʃ/
Temporarily shelving uncommitted changes so you can switch context, then reapply them later.
"I stashed my in-progress work before pulling the urgent hotfix branch, then popped the stash to resume."
- Bisect /baɪˈsekt/
A binary search through commit history to find the commit that introduced a bug, using git bisect good/bad.
"I used git bisect to narrow 200 commits down to the exact one that broke the auth flow — found it in 8 steps."
- HEAD /hed/
A reference pointing to the currently checked-out commit — usually the tip of the active branch.
"HEAD points to the latest commit on my branch — git log HEAD~3 shows the last three commits."
- Detached HEAD /dɪˈtætʃt hed/
State where HEAD points to a commit directly rather than a branch, meaning new commits won't be tracked by any branch.
"I ended up in detached HEAD state after checking out a tag — I created a new branch to save my experimental commits."
- Fast-forward /fɑːst ˈfɔːwəd/
A merge that simply moves the branch pointer forward because the target has no diverging commits — no merge commit is created.
"The merge was a fast-forward — main hadn't changed since I branched, so Git just moved the pointer forward."
- Squash /skwɒʃ/
Combining multiple commits into a single commit before merging, for a cleaner project history.
"We squash all commits on a feature branch into one before merging — the PR's 23 WIP commits become a single meaningful commit."
- Revert /rɪˈvɜːt/
Creating a new commit that undoes the changes introduced by a previous commit, preserving history.
"Rather than resetting, we reverted the bad deploy commit — the revert is visible in the log and safely undoes the change."
- Reset /riːˈset/
Moving the branch pointer to a previous commit. --soft keeps changes staged, --mixed unstages them, --hard discards them.
"I used git reset --soft HEAD~2 to undo my last two commits while keeping the changes staged for a cleaner re-commit."
- Tag /tæɡ/
A named reference to a specific commit, typically used to mark release versions (v1.0.0, v2.3.1).
"We create a tag for every production release — git tag v1.4.2 so we can check out any historical release instantly."
- Fork /fɔːk/
A copy of a repository under your own account, used to contribute to projects you don't have write access to.
"I forked the open-source library, made my bug fix in the fork, then opened a pull request to the upstream repository."
Quick Quiz — Git & Version Control
Test yourself on these 15 terms. You'll answer 10 multiple-choice questions — each shows a term, you pick the correct definition.
What does this term mean?