TOPIC 23/3718 MINNOT STARTED

Git and GitHub, hands on: clone, branch, commit, pull request

Test code lives in Git. Learn to clone a project, work on a branch, save a commit, open a pull request and settle a merge conflict.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a shared recipe book. Each cook copies the book. They try a change on a loose page. They tape the page in only after the family has tasted the dish. Every taped-in change has a note: who, what and why. If two cooks change the same line, they sit down and choose the words.

Tom, the tester at Daily List, a to-do list app, uses this for his test code. Leo, a developer, and Mei, the test lead, can read what he changed.

What it is: Git is a free program that keeps a full history of the files in a project. It runs on your own computer and works without the internet. Each is a snapshot, with who saved it and when. GitHub is a different thing. It is a website that stores Git projects so a team can share them. This topic is one slice of that pair. You clone a project, work on a (A separate line of work in Git, so changes do not touch the main code until they are merged), and save a Git commit (A saved snapshot of staged changes, with a message that says what changed). Then you open a pull request (GitHub). A branch is a separate line of work. A commit is one saved snapshot with a message. A pull request asks the team to review that branch before it joins the main line. Emailing a zip of the tests is the nearest neighbour, and nobody can see which line changed.

Why it matters: Test code lives in the same history as the app. If Tom edits the main copy directly, one slip breaks Leo's work. If he never opens a , Mei cannot review the checks before they land. Lily then meets the bug on the live app.

PLAIN WORDS · 1 in this section
github
a web site that hosts code and runs checks

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 Changing shared test code safely, like a family recipe book where each cook tries a change on a loose page first.

  1. Clone
  2. Branch
  3. Commit
  4. Pull request
Recipe book

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The family recipe bookThe main branch
A loose page for a trial changeA branch
A note with who, what and whyA commit message
Tasting before taping inA pull request review

WHERE THIS PICTURE STOPS

  • A paper book has one copy, but Git gives each person a full copy.
  • Cooks taste once, but a pull request can be reviewed many times.
  • Two cooks can talk, but Git only marks the lines in conflict.

HOOK

Try on a loose page, taste, then tape in.

TELL A FRIEND

A shared recipe book: change a loose page, taste, then tape it in.

OFTEN MIXED UP WITH Version control for testers. That topic explains why test code is kept under . This one practises the steps: clone, branch, commit, and conflict.

PRACTISE AND KEEP

Sources for this topic — 3 sources
  1. Market practice

    About Git (GitHub Docs) ↗ — GitHub · GitHub Docs: a clone is a local copy of a remote project; a commit records a snapshot of staged changes; merging joins separate lines of development (search excerpt, page not opened)

    Says a clone is a local copy of a remote project with its files, history and branches, that a commit records a snapshot of staged changes, and that merging joins separate lines of work. Vendor documentation. Practitioner guidance, not a standard. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. 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.

  2. Market practice

    Pro Git, 2nd edition: Git Branching — Basic Branching and Merging ↗ — Scott Chacon and Ben Straub · Basic Branching and Merging, fast-forward and three-way merge sections; opened 6 November 2026.

    Explains branches, fast-forward and three-way merges, and the conflict markers Git writes into a file. Practitioner guidance, not a standard. · Checked 2026-10-18

    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.

  3. Market practice

    Resolving a merge conflict using the command line (GitHub Docs) ↗ — GitHub · GitHub Docs: find the conflict markers, choose which changes to keep, delete the markers, then add and commit (search excerpt, page not opened)

    Walks through finding the conflict markers, choosing what to keep, removing the markers, then adding and committing. Vendor documentation. Practitioner guidance, not a standard. · Checked 2026-10-31

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. 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.