Skip to content

Lesson 2.6 · 4:43

Save points and undo

Goal: Make a save point, break something on purpose, and go back to it.

Try it

  1. Ask OpenCode to set up git and make a save point called "first save".
  2. Change hello.txt to just oops yourself.
  3. Ask OpenCode to go back to "first save".
  4. Open hello.txt and confirm your original lines are back.

You're done when hello.txt shows your original lines again after you broke it, and you checked it yourself.

Recap

  • Git keeps save points for a folder. A commit is one save point.
  • Save before a risky change and after something works.
  • Going back is a request to the agent. Checking the file afterwards is your job.

Next lesson (3.1): Module 3 starts. Your first app idea, in one sentence.