STAGE 01 / LESSON 07
Git: save and review changes
Git records a project’s history so changes can be reviewed, compared and shared.
THE IDEA
Understand it.
A commit records a snapshot of tracked content. A branch is a movable name for a line of commits; it lets you develop a change without putting unfinished work directly on the main branch.
A common collaboration flow is to create a branch, make a focused change, review the diff, commit it, push it, and open a pull request. Never commit credentials or private keys.
SEE IT IN CONTEXT
A local branch workflow
git status
git switch -c feature/task-list
# edit your files
git diff
git add app/page.tsx
git commit -m "Add task list"git diff lets you inspect unstaged changes; git status shows what is staged, modified or untracked.
LEARN FROM REAL WEBSITES
See it in the real world.
These simplified structures come from public sources. Company systems change, and the sources may describe only one project or an earlier design.
GitHub
Documentation checked November 2026Work on a branch
GitHub's guide describes creating a branch, making changes, opening a pull request and merging after review.
- Branch
- Commits
- Pull request and review
- Merge
What to learn: Branches and reviews make changes inspectable before they join the main line.
Read the source: GitHub flowGitLab
Documentation checked November 2026Track a project with Git
GitLab's guide introduces repositories, commits and branches as part of a Git workflow.
- Repository
- Changes
- Commit
- Branch history
What to learn: A commit records a snapshot in version history; a branch lets work develop independently.
Read the source: GitLab Git guideTRY IT YOURSELF
Practice.
If you edit two files but only stage one, what goes into the next commit?
Show one possible answer
Only the staged content goes into the commit. The other file remains modified in the working tree until you stage or otherwise handle it.
GO DEEPER