Stage 2 · Lesson 1 of 9
Commits and the staging area
is a tool that saves snapshots of your project, called . Each commit is a version you can go back to. The daily loop has a few steps.
You edit files in your project folder, which Git calls the . You choose which changes go into the next snapshot with git add; this is called staging, and the chosen changes sit in the . You check what you are about to save with git status and git diff.
Then you save the snapshot with git commit, and git log shows the history. Staging lets you commit one logical change at a time, even if you touched several files. Learn this loop before anything else, because branches, pull requests and undoing mistakes all build on it.
Commit small and often. A commit for each working step means you can always go back to the last version that worked, instead of one giant commit at the end of the week.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- GitHub repoFreeGitHub Skills: Introduction to GitHub
GitHub · Beginner
Free hands-on exercise: branch, commit, open and merge a pull request in about an hour
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT lectures on the tools degrees skip; the shell and version control lectures are enough here
Practise
Keep handy
Also worth your time
How to choose, structure and present projects so a reviewer sees your best work first