Your edits live inside the Codespace, which is a good enough home for an active work session but not a permanent one. GitHub will eventually recycle inactive Codespaces (after about a month of disuse at the time of writing), so you should periodically push your work back to the repository on github.com, where it is safe forever.
The operation has two parts, traditionally called commit (take a snapshot of the current state with a short note) and sync (upload the snapshot to GitHub). The Codespace combines them into a single action.
Youโll see a list of files youโve changed. At the top thereโs a text box asking for a message. Type something brief that describes what you did, for example Add right triangles lesson.
Click the blue Commit & Sync button (sometimes labeled Commit the first time, with Sync appearing after). If asked to confirm, say yes. You may also be asked to allow the Codespace to act on your behalf, which is expected.
Open a new tab, go to your repositoryโs page on github.com, and youโll see your changed files listed with your commit message next to them. If you refresh the page you see your latest edits reflected in the source files on GitHub itself.
Commit and sync often. Every time you finish a meaningful chunk of work (a new example, a fixed exercise, a reorganized section) is a reasonable moment. Each commit is a save point you can return to later if you decide you liked an earlier version better.