New! Explore our Programming Academy and AI Tutor - learn to code from scratch, free to start. Explore Now
Programming› Git› Why Version Control Matters

Why Version Control Matters

💻 Git

Understand the problem Git solves and the vocabulary you will use every day.

Lesson 1 of 9 Tutorial
0 of 9 completed

Without version control, teams copy folders named final-final-v2 and lose track of what changed. Git records every change with who made it and why.

By the end of this lesson you can:
  • Explain a repository, commit and branch.
  • Describe the three areas of a Git project.
  • Know when to commit.

The Three Areas

Your files sit in the working directory. You stage changes into the index. A commit saves the staged snapshot into the repository history.

Vocabulary

  • Repository — the project history, stored in a hidden .git folder.
  • Commit — one saved snapshot with a message and an author.
  • Branch — a movable label pointing at a line of commits.
  • Remote — a copy of the repository hosted somewhere else, such as GitHub.

What a Good Commit Does

A commit should describe one logical change. "Fix login redirect" is useful. "Changes" is not. Small commits are easier to review, revert and understand later.

Tip Commit early and often on your own branch. You can always tidy history before sharing it.

Practice

  1. Describe the difference between the working directory and the index.
  2. Write three commit messages you would be happy to read in a year.
  3. Explain why copying folders is not a backup strategy.

Hands-on exercise

Write short answers:
1. What does a commit store?
2. What is a branch?
3. Why are small commits easier to review?

Recap

Git records snapshots, branches separate work and commits should each tell one clear story.

Exercises

Exercise 1. Check your understanding Easy
Write short answers:
1. What does a commit store?
2. What is a branch?
3. Why are small commits easier to review?
Git exercise-1.txt
Expected Output
Clear answers using the vocabulary from the lesson.

Lesson Nav

Lesson sections