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 for risky or alternative attempts card 3 of 6

The branch-per-attempt routine

builds on: Branches as parallel lines of work, Commit before every task: checkpoints
1. On `main`, check that `git status` shows nothing to commit. 2. Run `git switch -c try-<idea>`. 3. Give the task. Commit accepted steps on this branch. 4. Commit before switching. Uncommitted edits belong to no branch and come with you. 5. For a second idea: `git switch main`, then `git switch -c try-<other>`. 6. Compare with `git diff main try-<idea>`. Then switch to each branch and run that version. 7. To keep one: from `main`, `git merge` it. To drop one: `git branch -D` it.
Terms on this card
branch
A named, movable pointer to a line of commits. New commits move the pointer of whichever branch is checked out.
`main`
The usual name of a project's primary branch: the line of work you treat as the good, current version.
commit
A saved snapshot of your project's tracked files, with a message. You can return to it later.
`git status`
Shows which branch you are on and which files have changes that are not yet committed.
diff
A line-by-line listing of what changed between two versions of files: removed lines and added lines.
Learn this step by step on Bytewise
Lesson goal: Put a risky change or a second approach on its own branch so main stays clean. Compare the two attempts and merge or delete the branch. · the whole lesson