Version control for testers
Version control keeps every change to the code and the tests, with who made it and when. A tester needs a few of its moves: branch, merge, stash and a safe push.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a shared document where every edit is kept. Each change is saved with a name and a date. You can open an older copy. You can undo a change that went wrong. But a shared document usually has one live copy. This tool gives every person a full private copy, and joins the copies later.
Daily List is a to-do list app. Leo, the developer, keeps the app code in this kind of store. Tom, the tester, keeps his test files in the same store. Nobody emails files around.
What it is: records every change to a set of files. It stores who made each change, and when. You can return to an older copy. The store is a repository. One saved change, with a short note, is a commit. Git is the usual program for this. It is free, it keeps the full history on your own computer, and it works offline. GitHub is a different thing. It is a website that stores Git projects so a team can share them. A is the stop when two people change the same lines and the tool will not guess. A rebase moves your commits onto newer work and rewrites them. A single shared document is the nearest neighbour.
Why it matters: Test files, and notes live with the code. If Tom cannot fetch Leo's branch, he tests the wrong files. If he rebases work other people already have, their copies no longer match. Mei, the test lead, then cannot tell which change broke the suite.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named here are invented.)
PLAIN WORDS · 3 in this section
- github
- a web site that hosts code and runs checks
- rebase
- replay your changes on top of the latest work
- rebases
- replays of your changes on top of the latest work
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Keeping every change to code and tests, with author and date, so a team can join work safely and undo a slip.
- Save a version
- Work on a branch
- Join with a merge
- Resolve a conflict
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The shared document | The repository |
| Each saved version | A commit |
| A private copy to try ideas | A branch |
| Two people editing one line | A merge conflict |
WHERE THIS PICTURE STOPS
- A shared document has one live copy. Each person here holds a full private copy.
- A word processor merges silently. Git stops and asks a person.
- Undoing in a document is simple. Rewriting shared history can harm teammates.
HOOK
Save, branch, join with care.
REMEMBER IT THIS WAY
A contrast: two neighbours told apart by one test.
A shared document has one live copy. gives each person a full private copy, and when two people change one line it stops and asks.
| In the trick | What it stands for |
|---|---|
| Shared document | One live copy |
| Version control | Each person has a full private copy |
| Merge conflict | The tool stops and asks a person to choose |
TELL A FRIEND
A shared document with full history. A tester needs branch, merge, stash and a careful push.
OFTEN MIXED UP WITH The tester in a Scrum team. The Scrum team lesson explains where a tester fits in a team. This lesson shows the tool a team uses to share files and history.
PRACTISE AND KEEP
Sources for this topic — 6 sources
- Market practice
Pro Git, 2nd edition: Git Branching — Basic Branching and Merging ↗ — Scott Chacon and Ben Straub · Basic Branching and Merging: a branch is a movable line of work; when two branches change the same lines, Git stops and writes conflict markers into the file (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Pro Git, 2nd edition (CC by-NC-SA). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Pro Git, 2nd edition: Git Branching — Rebasing ↗ — Scott Chacon and Ben Straub · Rebasing: rebase replays your commits on top of another base; do not rebase commits that exist outside your repository and that people may have based work on (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Pro Git, 2nd edition (CC by-NC-SA). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
git-push documentation (Git) ↗ — Git project · Current force-with-lease safety note, opened 6 November 2026: implicit remote-tracking expectation and background-fetch limitation.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Git reference manual, version not recorded. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
git-stash documentation (Git) ↗ — Git project · Current stash Commands/Options, opened 6 November 2026: default tracked changes, -u untracked, conflicted pop retains entry.
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Git reference manual, version not recorded. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
git-cherry-pick documentation (Git) ↗ — Git project · git cherry-pick applies the changes of existing commits and records a new commit for each; -x records the source commit in the message (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Git reference manual, version not recorded. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Git - Remote Branches (Pro Git) ↗ — Git project · r8a-progit-remote-branches (fetch does not change the working directory; pull is fetch then merge; checkout switches branch). Search excerpt, page not opened.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.