Git timeline
A pretend Git: edit files, then git add, git commit, git status and git log, and undo an edit.
Git remembers every saved version of a folder. A saved version is a commit, and each commit has a message that says what changed.
Saving takes two steps: git add chooses which changes go into the next commit, and git commit saves them. git status shows where each file is, and git log lists the commits, newest first. Nothing here touches a real repository.
Things to try
- Edit index.html, then run git status. What does it say?
- Run git add . and then git status again. What changed?
- Make a commit with a message and then run git log. Where is your commit?
- Edit a file, then press Undo my edit. Which Git command did that run?