Collaboration and Review Lab
What This Practice Page Is For
This lab simulates shared-repository work. You will practice remote synchronization, topic branches, and review-style communication.
Setup
Create:
- one bare repository acting as
origin - two working clones,
aliceandbob
If you already have two machines or two real collaborators, that is even better.
Retrieval Prompts
- What does
git fetchchange locally? - What does
git push -u origin feature-xdo? - What makes a pull request easier to review?
Compare and Distinguish
Compare:
- local branch
- remote-tracking branch
- upstream branch
Use one short concrete example for each.
Common Mistake Check
For each mistake, explain the better move:
- Using
pullwithout checking whether your branch has local commits. - Pushing directly to the shared main branch for every experiment.
- Opening one pull request that mixes refactor, bug fix, and docs cleanup.
Mini Application
Run this scenario:
- in clone A, create and push a branch
- in clone B, fetch and inspect before integrating
- in clone B, create a review note describing the incoming change in two sentences
- make a second change in clone B on a separate topic branch
- push it and describe what the pull request title and summary should be
- integrate both changes into
main
Evidence Check
You are done only when you can show:
- one upstream-tracking branch
- one fetch-before-integrate workflow
- one short review summary of a branch's purpose
- one example of a small focused branch name and commit set
If You Got Stuck
Revisit:
- Remotes, Fetch, Pull, and Push
- Pull Requests, Code Review, and Conflict Resolution
- Commit Discipline and Everyday Workflow
Integrated Practice Expansion
Simulate a small team handoff.
- Clone the same bare repository into
aliceandbo. - In
alice, createfeature/readme-contract, push it, and set the upstream branch. - In
bo, runfetch, inspectorigin/feature/readme-contract, and check it out locally without usingpull. - Make a review commit in
bo, push it to a separate branch, and write a pull request summary with scope, test evidence, and risk. - In
alice, fetch again and explain how the two local branch names differ from the two remote-tracking names.
Evidence check:
- output from
git branch -vv - a pull request summary that a reviewer could act on
- a note explaining why
fetchis safer than blindpullwhen you are inspecting someone else's branch