Work as a team:
branches and pull requests
Continue your S3 project with one branch per change. Learn to review the diff, describe tests and decide what can go into main, with AI assistance.
- Format
- Self-paced and online
- Estimated time
- About 2.5 hours, over one or more sittings
- Essential
- Branch → PR → review → merge
- Optional
- Try the challenge with a partner
↩From session 3: you have your GitHub repository, know commit / push / pull and use the context method. Until now you worked on main. Today you stop editing it directly.
Choose an available, authorised tool. An external chat needs you to attach the material; an agent can read files within its permissions. In both cases, you review the result.
Review with another person (optional)
You can compare your review with another person. If possible, try this challenge with someone from work, your studies or this course:
- In your repository: Settings → Collaborators → invite an authorised person to the practice repo with the permissions they need. Review access when the collaboration ends.
- Your partner creates a branch in your repo, makes a small change and opens a pull request.
- You review it (read the diff and ask AI for help if useful) and merge it when ready.
You have practised a shared change and review. The full team workflow (a shared repository and protected main) is an optional challenge in session 5.
Record the change, tests and pending work in the S4 and S5 tracking worksheet.
Before you finish…
Review your change and tick only what you have checked:
- ✓I understand what a branch separates and why I review before integrating into main.
- ✓I created a branch and made a change there (not on
main). - ✓I opened a pull request and read the diff (what changes).
- ✓I checked the AI review against the diff and tests.
- ✓I merged the PR into
mainand updated my working copy. - ✓I distinguish merging from publishing and know what to check at /exec.
main is the shared baseline. Integrate small, reviewed and tested changes; keep a way to recover them.clasp), first manual and then automatic if you choose. There is also a team exercise for the optional classroom route.Check your understanding
This is for you, not an exam or a grade. Think through your answers, then compare them below.
- Why work on a branch instead of changing
maindirectly? - What is a pull request? Does opening one merge it?
- In the diff, what do green and red mean? Who decides to merge?
See the answers ▾
1. The branch separates the change’s commits until they are integrated into main. It does not automatically separate Google data or deployments.
2. It is a request to merge the branch into main. Opening it merges nothing: review comes first.
3. Green (+) = added, red (−) = removed. You decide: AI offers pointers, not orders.