.venv, as described in lesson 1. Use a fresh folder name practice-project; if it already contains earlier work, use that existing exercise or choose a separate tutorial folder. Do not run this over an unrelated project.
1. Create the practice project
Run this on either operating system:2. Put a greeting in a file
Windows PowerShell:Hello from PeopleBot. The greeting has no final line break, so your next terminal prompt may appear immediately after it. That is expected.
3. Save the first snapshot
Run these commands on either operating system:add selects the file for the next snapshot. commit saves that snapshot. The example name and email label this local tutorial commit only; they do not change your global Git identity or send email.
-C practice-project tells Git which folder to use, so you can stay in the tutorial’s outer folder throughout the exercise.
4. Change the file without saving another snapshot yet
Windows PowerShell:Hello from PeopleBot. Here, HEAD means the currently selected commit. The second command shows the change: a minus line for the old text and a plus line for the new text. Those signs are part of the comparison, not part of your file.
The important idea: editing a file and saving a Git snapshot are two different actions.
5. Save the second snapshot
HEAD~1 selects the previous commit. Neither command changes your files.
If you get stuck
- “Nothing to commit”: the file may already be saved. Use the two
showcommands to inspect the versions you have. - “Not a git repository”: check you are still in the outer tutorial folder and
practice-projectexists there. HEAD~1does not exist: you have not yet completed both commits.