Saving a snapshot with git add and git commit
Records a snapshot of the files you staged with git add, saving it in the repository history with a short message that explains what changed.
Understanding Saving a snapshot with git add and git commit in VCE Software Development U4O1
What it does: The dot means the current folder, so git add . stages all changes ready for a commit. This message is short and specific, so teammates can tell what the snapshot changed without reading the code. git add moves changes into the staging area. git commit then records whatever is staged. git commit -m saves the staged snapshot in the repository history with a message. git add only stages files. The -m flag needs its hyphen. It tells git the message follows, in quotes, on the same line. Use a clear message that describes the change, such as git commit -m "Add input validation to age field".
Common mistakes: The command is misspelled. Staging a file uses git add, so the line should be git add main.py. The -m flag is missing. Without it git does not read the text as a message. It should be git commit -m "Fix tax bug".
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 82–114) and word search (Modules 3–114).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
git commit -m "message"Fill in the Blanks
Spot the Error
Student with a class code? Join your class →