Every commit is a save point you can look inside. Name a commit by its hash (git log --oneline shows them):
text
git show 4e1d2a7 ← what that commit changed
git show 4e1d2a7:prices.txt ← the whole file, as it was thenTo bring the old version back, restore it from that commit, then commit:
text
git restore --source=4e1d2a7 prices.txt
git add prices.txt
git commit -m "Bring back the old prices"Going back never erases anything: the old version comes back as a new commit, and every save point stays in the history.
Customers miss the launch prices. Bring them back.
Objectives
- Find what a potion cost at launch.
- Commit the launch prices again.
- Keep every save point in the history.