Skip to content
Guest
Learn Git · Course Syllabus Show lessons
Core Version Control · 7 min read · Beginner

Init, Status, Staging & Commits

Understand Git's three areas (working tree, staging area, repository) and record your first clean commits.

What you'll learn

  • Understand the working directory, staging area (index), and commit history
  • Inspect changes with git status and stage files with git add
  • Write clear, atomic commit messages with git commit -m

Git is a distributed version control system that records snapshots of your project over time. Instead of saving final_v2_real.zip, every change is tracked in a verifiable commit history.

The Three Areas of Git

  1. Working Directory: The files you currently edit on disk.
  2. Staging Area (Index): The exact changes you select to include in your next snapshot (git add).
  3. Repository (.git): Permanent, hashed snapshots (git commit).

Fill-in-the-Blank Exercise

Stage and Commit Workflow

Stage all modified files and create a commit with a descriptive message.

git  .
git  -m "Add landing page hero"

Try It Yourself (Interactive Git Terminal)

GitStage, Commit & Inspect History
main
(main) $ git status
On branch main
Untracked files: index.html, styles.css

Check Your Understanding

Score: 0 / 1

1. Which command moves modified files from your working directory into the staging area?

Study Workspace

Finished this lesson?

Your progress is saved locally in your browser, no account needed.

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind