Why this session is the whole point
Every team has lived the horror story: final.docx, final_v2.docx, final_v3_FINAL.docx, and nobody knows which one the boss approved. Sessions 1-3 gave you a repo, a README and a task board. Today those become a real collaboration system: branches (safe copies), pull requests (proposals with a conversation), and reviews (comment, suggest, approve). One flow replaces the email attachment forever - and it works on your handbook exactly as it works on the world's biggest software.
Branches: safe copies 4 min live
A branch is a parallel copy of the whole repo where you can work freely without touching the real thing. The real thing has a name: main - the published truth everyone reads. Your branch is your draft desk; nothing you do there changes main until the team accepts it.
LiveYou never have to create a branch on purpose2 min▶
Here is the friendly secret: the web editor offers the branch to you. Open a file, click the pencil ✏️, make your edit, press Commit changes - and if you should not be writing to main directly, GitHub shows a radio button: "Create a new branch for this commit and start a pull request." Pick it, and the safe copy plus the proposal appear together. No ceremony.
- Name the branch after the change: clarify-expense-policy, fix-onboarding-typo, add-travel-section. Future readers (including future you) thank present you.
- One branch, one topic. A branch that changes ten unrelated things is as unreviewable as an email titled "misc updates".
- Branches are cheap and disposable. Make one for a two-word edit. After the merge it gets deleted and nothing of value is lost - the history moved into main.
Self-studyWhere branches live, and how they end2 min read▶
- Seeing them: the branch dropdown at the top-left of the Code tab (it usually says "main") lists every branch in the repo. Click one to browse the repo as that draft sees it - a whole parallel world, one click away.
- Branches end one of two ways: merged (the purple badge - the draft became truth) or deleted unmerged (the proposal was declined, main untouched). Both endings are safe; neither loses history that reached main.
- Stale branches - drafts someone opened and forgot - are the repo's junk drawer. Deleting a merged branch is always safe; ask before deleting an unmerged one, exactly as you would before binning a colleague's marked-up printout.
Pull requests: proposals with a conversation 6 min live
A pull request (PR) says: "here is my branch - compare it to main, discuss, then accept." It is a proposal, a track-changes view, and a meeting thread fused into one page. Nothing changes on main while the PR is open; declining it harms nothing.
LiveThe diff is the world's best track-changes3 min▶
- Red lines = removed, green lines = added. A changed sentence shows as one red line (the old) plus one green line (the new). Reviewers see exactly what would change - never a wall of maybe-different text.
- The Conversation tab collects every comment, decision and "why we did this" - attached to the change forever. Six months later, the reasoning is one click away instead of buried in someone's inbox.
- Draft PRs say "not ready yet - look, but do not review formally". Perfect for work in progress you want visible early.
- Closing without merging = proposal declined. Main never changed, the branch can be deleted, and the discussion stays on record. Saying no is safe, cheap and polite here.
GitLab's public handbook is the famous proof: thousands of employees, and every policy change - salary formulas, parental leave, meeting norms - lands as a pull request reviewed in the open. HR people and lawyers open PRs daily; almost none of them code. And closer to home: the pages of this very course ship via pull requests, one session per proposal.
Reviews: comment, suggest, approve 5 min live
A reviewer opens Files changed, reads the red and green, and has four moves: comment on any line, suggest an exact replacement, request changes, or approve. The suggestion is the showstopper - the author accepts the reviewer's exact fix with one click.
LiveThe four reviewer moves, and who presses merge3 min▶
- Comment: attach a note to one specific line. No more "in the third paragraph on page 2, I think...". The line itself carries the discussion.
- Suggest: the ± icon in the comment box lets you type the exact replacement text. The author sees your version rendered as its own mini diff and clicks Commit suggestion - your fix lands, attributed to both of you, no retyping. This one button converts vague feedback into finished work.
- Request changes: the formal "not yet" - the PR shows a visible block until concerns are resolved.
- Approve: the formal thumbs-up. Convention: the author merges after approval - reviewers advise, the proposer ships.
Then the merge: one green button, the badge flips to purple Merged, the branch gets deleted, main is updated, and every commit and comment is preserved in the history. The draft became the published truth, with a paper trail.
Self-studyMerge conflicts + branch protection, in one screen3 min read▶
Merge conflicts, one paragraph: if two people edit the same line of the same file on different branches, GitHub cannot guess which version wins - so it shows both, marked clearly, and asks a human to pick. The web UI has a built-in editor that handles simple cases in a minute (choose one version, or blend them, then confirm). Genuinely gnarly conflicts are tech-track territory; your defense in a docs repo is simply small PRs merged promptly, which makes collisions rare.
Branch protection: Settings → Branches → add a rule on main requiring 1 approving review before merge. That single setting turns review from a favor into a rule - nobody, including the repo owner on a rushed Friday, can push straight to the published truth. It is this week's homework for a reason.
The full loop, solo ★ 8 min · everyone merges
The whole superpower in 8 minutes: one edit travels branch → PR → diff → merge, and you press every button yourself.
Open your handbook repo's README and click the pencil ✏️. Change one sentence - improve a wording, fix a phrase, anything real.
Press Commit changes, and this time choose "Create a new branch for this commit and start a pull request." Name the branch after the change (improve-readme-intro), then Propose changes.
On the Open a pull request screen, write a one-line description of why, and click Create pull request. You now have a live proposal.
Click Files changed and read your diff: the old sentence in red, yours in green. This is what a reviewer would see.
Back on Conversation, press Merge pull request → Confirm merge → Delete branch. Watch the badge turn purple Merged. Check the README on main: your sentence is the published truth, and the PR page is its permanent receipt.
Pair review: both sides of the flow ★ 8 min · in pairs
Author and reviewer are two different feelings - have both today. Pair up with a neighbor (solo attendees: use the presenter's demo repo, invitation link in the room chat).
Partner A opens a PR on their handbook changing one line (same moves as Apply-along 1), and adds Partner B as a collaborator if needed (Settings → Collaborators).
Partner B opens the PR → Files changed, hovers a line, clicks the blue +, and leaves one comment ("love this because...").
Still B: on another line (or the same one), click the ± suggestion icon and type an exact replacement wording. Submit the review.
Partner A opens the suggestion and clicks Commit suggestion. One click - B's exact fix just landed on A's branch, no retyping. Feel that.
B approves (Review changes → Approve). A merges. Purple badge. Everyone in the room has now been both author and reviewer - the complete collaboration loop.
Which step of the journey is this? ★ 6 min · everyone sorts
Six moments from a handbook change. Place each one on the branch → commit → PR → review → merge journey.
This week ◐ 25 min total
- Every handbook change goes through a branch + PR this week - even solo. Reading your own red/green diff before merging catches your own mistakes; it is track-changes for an audience of one, and it builds the reflex.
- Turn on branch protection: Settings → Branches → add a rule on main requiring 1 approving review. Review just became a rule, not a favor.
- Close an issue by merging a PR. Pick one open issue from Session 3's board, make the change on a branch, and put "closes #3" (your issue's number) in the PR description. When the PR merges, GitHub closes the issue automatically - work and task, linked forever.
Three questions before you go 🎯 ◐ 90 seconds
1 · What actually happens when a pull request is merged?
Merge = draft accepted into the published truth, with the paper trail kept forever. Nothing is lost; the branch itself can be safely deleted because its story moved into main.
2 · A reviewer leaves a suggestion on line 12. What does that let the author do?
The suggestion carries the exact fix; Commit suggestion lands it on the branch instantly, credited to both people. Feedback becomes finished work with one click.
3 · In a pull request diff, what do the red and green lines mean?
A changed sentence shows as its old self in red plus its new self in green - the world's best track-changes, and the thing reviewers actually read.
Official GitHub Skills coverage
This course maps to GitHub's own free Skills exercises - each session tells you honestly what is covered here and what the official course adds.