Skip to main content

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:

  1. one bare repository acting as origin
  2. two working clones, alice and bob

If you already have two machines or two real collaborators, that is even better.

Retrieval Prompts

  1. What does git fetch change locally?
  2. What does git push -u origin feature-x do?
  3. 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:

  1. Using pull without checking whether your branch has local commits.
  2. Pushing directly to the shared main branch for every experiment.
  3. Opening one pull request that mixes refactor, bug fix, and docs cleanup.

Mini Application

Run this scenario:

  1. in clone A, create and push a branch
  2. in clone B, fetch and inspect before integrating
  3. in clone B, create a review note describing the incoming change in two sentences
  4. make a second change in clone B on a separate topic branch
  5. push it and describe what the pull request title and summary should be
  6. 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:

Integrated Practice Expansion

Simulate a small team handoff.

  1. Clone the same bare repository into alice and bo.
  2. In alice, create feature/readme-contract, push it, and set the upstream branch.
  3. In bo, run fetch, inspect origin/feature/readme-contract, and check it out locally without using pull.
  4. Make a review commit in bo, push it to a separate branch, and write a pull request summary with scope, test evidence, and risk.
  5. 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 fetch is safer than blind pull when you are inspecting someone else's branch