1.4 KiB
1.4 KiB
First Repo — Extended Notes
Not rendered yet. For instructors and a future "learn more" surface.
Purpose
The first paired exercise of the program. Cadets have just finished the bash basics; this introduces them to the battle pattern (defender writes, attacker reviews, then swap) using a tiny but real Git workflow: init, commit, log.
Skills Demonstrated
- Composing learned commands (
git init,git config,git add,git commit) into a single script - Reading another cadet's script to verify behavior
- Filling out the review checklist constructively
Common Pitfalls
- Skipping
git config— the commit either fails or uses a fallback identity that's not the cadet's. Reviewer should rungit config --local user.nameto confirm. - Wrong file content —
echo "hello world"(lowercase) doesn't matchHello, World. Reviewer mustcat hello-world.txtand check byte-for-byte. - Wrong commit message —
add hello world(no dash) is notadd hello-world. Reviewer should rungit log --format=%s. - Multiple commits — sometimes a cadet stages files twice and ends up with two commits. The spec asks for exactly one.
Discussion Prompts (post-battle)
After both rounds, pair discusses for 2–3 minutes:
- Whose script was easier to read? Why?
- What did you check first when reviewing? Why?
- If this script ran on a server, what could go wrong?