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.
Undoing with git: discard, reset, revert
card 2 of 6
Uncommitted work has no backup
builds on: git status and reading a diff
Git only keeps copies of what you committed. The files on disk (the **working tree**) may differ from the last commit, and those differences exist nowhere else. Throwing away uncommitted edits deletes them for good. There is no recycle bin.
A commit is a saved snapshot. To undo one, you don't erase it. You add a new commit that does the exact opposite, and both stay in history.
Terms on this card
- working tree
- The actual files in your project folder as they are right now, which may differ from the last commit.
- commit
- A saved snapshot of your project's tracked files that git can always return to.
- uncommitted
- Changes in your files that are not yet saved in any commit. Git has no copy of them.
- history
- Git's record of every earlier version of every file it tracked, kept even after a file is later deleted.
Lesson goal: Choose the right undo. Discard uncommitted changes to files, return to the last commit, or revert a commit that is already made. Know which of these permanently loses work. ·
the whole lesson