M. Kodirov

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 2026

Work on a branch

GitHub's guide describes creating a branch, making changes, opening a pull request and merging after review.

  1. Branch
  2. Commits
  3. Pull request and review
  4. Merge

What to learn: Branches and reviews make changes inspectable before they join the main line.

Read the source: GitHub flow

GitLab

Documentation checked November 2026

Track a project with Git

GitLab's guide introduces repositories, commits and branches as part of a Git workflow.

  1. Repository
  2. Changes
  3. Commit
  4. Branch history

What to learn: A commit records a snapshot in version history; a branch lets work develop independently.

Read the source: GitLab Git guide

TRY 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

Official references.