Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Branches as parallel lines of work
card 3 of 6
The experiment routine
builds on: Git commits as snapshots you can return to
1. Commit everything first, so nothing is half-saved.
2. `git switch -c <name>` creates a branch at the current commit and moves you onto it.
3. Work there and commit as usual. Only this branch's pointer moves.
4. `git switch <name>` jumps between branches. `git branch` lists them; `*` marks yours.
5. **It worked:** `git switch main`, then `git merge <name>`, which brings that branch's commits into the branch you are on. Then `git branch -d <name>` removes the now-unneeded name.
6. **It failed:** `git switch main`, then `git branch -D <name>`.
Terms on this card
- branch
- A named pointer to one commit. It moves forward each time you commit while on it, so it marks the tip of a line of work.
- commit
- A saved snapshot of the whole project with a message, which you can return to later.
- pointer
- Something that refers to a location rather than holding the content itself. Here, a branch name that refers to one commit.
- merge
- Bringing the commits from another branch into the branch you are currently on, using `git merge <name>`.
- `git branch`
- Lists your branches and marks the one you are on with `*`.
Lesson goal: Explain a branch as a movable pointer to a line of commits. Create one for an experiment, switch between branches, and merge or delete it depending on how the experiment went. ·
the whole lesson