Level 1 · Digital Foundations · Course 1.3 Version Control
Module 9: Introduction to Git
Goal: use Git to save the history of your work, so you can see what changed and go back when something breaks. This is your most important safety net when working with AI.
You'll need: VS Code and the my-first-site folder from Module 8.
Lessons
- 1Why version control exists15–25 minutes✓
- 2Repositories15–25 minutes✓
- 3Commits15–25 minutes✓
- 4Staging and history15–25 minutes✓
- 5Restoring changes15–25 minutes✓
🛠️Module practice: your first history
In my-first-site:
- Make three separate, small changes to
index.html, committing each with a clear message. - Show the history with
git log --oneline. - Make a fourth change, but throw it away with
git restore. - Revert your second commit with
git revertand look at the history again.
✅Module check
Explain in a few sentences, in your own words:
How does Git protect your work when an AI is making changes to your project?
Show a good answer
A good answer mentions: Git records each commit as a snapshot with a message, so you can see exactly what
changed (git status, git diff) and go back. If you commit before asking the AI for a change, a bad result can
be thrown away with git restore, and a bad commit can be undone safely with git revert. Small commits make
each change easy to check and undo.
📝Module quiz
10 questions · 10 marks each · 100 marks in all · pass mark 70% · retry as often as you like ·
