What is Git and Why It Exists
2 min read
The problem Git solves
Imagine writing a college project and saving files like project_final.docx, project_final_v2.docx, project_FINAL_really.docx. That chaos is exactly what version control removes.
Git is a distributed version control system. It records the full history of your project so you can:
- go back to any previous state,
- see who changed what and when,
- work on features in isolation, and
- collaborate without overwriting each other's work.
The key mental model: snapshots
Most beginners think Git stores differences between versions. It does not. Git stores a snapshot of all your files at each commit. If a file didn't change, Git just links to the previous identical copy — it doesn't store it again.
Think of each commit as a photograph of your entire project at one moment in time.
The three areas
Every file in a Git project lives in one of three places:
| Area | Meaning |
|---|---|
| Working Directory | The actual files you edit |
| Staging Area | Files you've marked to be saved next |
| Repository (.git) | The committed, permanent history |
# Check Git is installed
git --version
# Tell Git who you are (one-time setup)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
In the next lesson we'll create our first repository and make a commit.