Skip to content

Commit 7208176

Browse files
committed
Add branching challenge sheet
1 parent c333eec commit 7208176

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Module 2 Exercises — Branching
2+
3+
Use the disposable student lab.
4+
5+
## Challenge 1 — Predict branch movement
6+
7+
Create two commits on `main`, create a feature branch, add two more commits there, and draw the commit graph you expect before inspecting it.
8+
9+
Then run:
10+
11+
```bash
12+
git log --oneline --graph --decorate --all
13+
```
14+
15+
Explain what the branch names point to.
16+
17+
## Challenge 2 — Fast-forward vs merge commit
18+
19+
Produce one merge that can fast-forward and one merge where both branches have diverged.
20+
21+
Before each merge, predict the resulting graph.
22+
23+
**Pass when:** you can explain why the outcomes differ without describing branches as folders or copies.
24+
25+
## Challenge 3 — Branch cleanup
26+
27+
Merge a finished feature, verify the work is reachable from `main`, then delete the local feature branch.
28+
29+
Explain why deleting the branch name does not delete commits that remain reachable from `main`.
30+
31+
## Boss check — Unknown graph
32+
33+
Create a small history with at least three branches and six commits. Leave it for a while, return without notes, inspect it, and explain which work is merged and which work remains isolated before running a merge command.

0 commit comments

Comments
 (0)