Lesson 1: Why Git exists — save points for files
Lesson objectives:
- Explain why version control helps when you edit files.
- Name the three main ideas: version control, repository, and commit.
- Identify one place in your own work where Git would help.
The "final_final_v2.docx" problem
Have you ever named a file report_final.docx, then report_final_v2.docx, then report_final_v2_REALLY.docx? That is a homemade version-control system. It works until it doesn't: you overwrite the wrong file, you can't remember which "final" has the paragraph you liked, or you delete a whole afternoon of work by mistake.
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later 1. Git is a popular version-control tool. Think of it as a save-point system for your whole folder: each time you tell it to save, it remembers the exact state of every file at that moment.
A Git repository (often just called a repo) is a folder where Git has been asked to keep those save points. Inside, it stores the history quietly so you can keep working normally 2.
The three ideas you need
There are only three new words in this lesson.
- Version control — remembering different versions of your files over time.
- Repository — a folder Git is watching.
- Commit — one saved snapshot, like a checkpoint in a video game.
When you commit, Git records who made the change, when it happened, and a short message you write. Later you can jump back to any commit.
The diagram shows a simple idea: your folder becomes a repository, and the repository keeps a chain of commits.
Worked example (follow along)
Think of a writer named Priya.
- Priya opens her laptop and creates a folder called
novel. - She types
git initinside that folder. Now it is a repository. (You do not need to know these commands yet; Lesson 2 walks through every one of them.) - She writes a chapter and runs two commands:
git add chapter1.mdandgit commit -m "First draft of chapter 1". - The next day she changes the chapter. She runs
git add chapter1.mdandgit commit -m "Add opening scene". - She now has two save points. If she hates the new opening, she can return to the first commit.
This is the everyday skill Git gives you: never lose work you already did.
Your turn (faded example)
Fill in the blanks with the right word from this lesson: version control, repository, commit.
A _______ is a folder Git is watching. When you save a snapshot, it is called a _______. The whole system that remembers versions over time is called _______.
Answer: repository, commit, version control.
Summary + what's next
This lesson introduced the pain point Git solves: losing work you already did. You learned three ideas — version control, repository, and commit — and you checked whether Git is installed. In the next lesson, you will turn a real folder into a repository and make your first commit.
Footnotes
-
Pro Git, About Version Control — https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control.html ↩
-
Pro Git, Getting a Git Repository — https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository ↩