Stage 11 · L46
Work through branches, merges and revision-bound review
Optional supplement · original Session 10
Git history/conflict behavior was checked with a temporary local bare remote; no external repository was pushed.
Download starter · Download solution
Use the starter for this stage's focused examples. The cumulative transfer and solution belong at the stage-end capstone. Baseline checks pass; transfer checks initially fail. Downloads contain the matching native starter and solution for this stage.
A branch names a line of history; it is not a second physical copy of every file. Commits capture staged source state. The working tree contains current files; the index selects the next commit. Review git diff and git diff --cached separately so unintended files do not join a focused change.
fetch updates remote-tracking references without integrating them into your current branch. A fast-forward moves the branch pointer when the target history already descends from it. A merge combines divergent histories and may create a merge commit. pull performs a fetch plus the configured integration behavior; use an explicit policy such as --ff-only when that is your intent.
The local fixture used a temporary bare remote and two clones. Both edited the same welcome line, fetch exposed the divergent history, merge produced real conflict markers, and a reviewed resolution preserved the intended application behavior. The resolved commit had two parents and a clean worktree. The fixture was removed and no external repository was contacted.
Resolve conflicts by reading both changes and the surrounding code, not choosing ours/theirs mechanically. A conflict-free merge can still break the contract. Re-run relevant HTTP/database tests against the actual resulting revision and review the diff before proposing it.
A pull request proposes a specific revision for review. Test evidence for an earlier commit can become stale after another change. State the revision, tests and material limits in the review. This main Aabha project is not a Git checkout; the exercise and quality examples live in learner snapshots and do not configure a hosted project or push a release.
Read the local commands
Focused lesson example; see the end-of-stage capstone for the cumulative app · stage 01
git status
git diff --cached
git fetch origin
git log --oneline --graph --all
git merge origin/mainPredict and observe this focused example using the concepts explained above. Its boundary is stated in the focused answer.
Guided lab
- Read the explanation and predict the focused example’s outcome.
- Resolve a same-line conflict in two owned local clones and record a two-parent merge plus the actual tested revision.
- Compare the observed outcome with the focused answer and state its boundary.
Expected: Read both intended API changes, choose the coherent contract, remove conflict markers, review the staged diff and rerun the stage01 checks before the merge commit. fetch updates remote-tracking references without integrating the current branch; merge integrates histories. A local merge is not a hosted PR or configured protection.
- A clean conflict resolution does not prove behavior; a green earlier revision does not certify later changes.
Focused exercise and answer
Complete the manual exercise in your learner repository and record which checks actually ran.
Your transfer task: Resolve a same-line conflict in two owned local clones and record a two-parent merge plus the actual tested revision.
- Resolve a same-line conflict in two owned local clones and record a two-parent merge plus the actual tested revision.
Inspect the matching answer
This answer addresses the focused exercise above; the cumulative implementation is shown only after the stage prerequisites.
Read both intended API changes, choose the coherent contract, remove conflict markers, review the staged diff and rerun the stage01 checks before the merge commit. fetch updates remote-tracking references without integrating the current branch; merge integrates histories. A local merge is not a hosted PR or configured protection.Check your reasoning
What changes when you fetch?
Show the explanation
Remote-tracking references are updated; your current branch and working tree are not integrated until a deliberate merge/rebase/pull policy.
Reading progress
54 lessons remain open to guests. Marking a lesson read records reading only; it does not award assessment credit or a certificate.
Device reading marks require browser storage. Reading is always available.
Sign in or create an account to save separate account progress. Your current page is kept.
Your earlier place on this device suggests these lessons. No new lesson is marked read.