What is Git?
Git is a distributed version control system created by Linus Torvalds in 2005. It tracks changes in your files and lets you collaborate with others.
Why Git?
- Track history — Every change is recorded. You can always go back.
- Branch & merge — Work on features in isolation, then combine them.
- Distributed — Every developer has a full copy of the repository.
- Fast — Most operations happen locally, no network needed.
Key Concepts
Repository
A repository (or "repo") is a directory tracked by Git. It contains all your project files and the entire history of changes.
Commit
A commit is a snapshot of your project at a point in time. Think of it as a save point in a video game.
Branch
A branch is an independent line of development. The default branch is usually called main.
Working Directory, Staging Area, Repository
Git has three main areas:
- Working Directory — where you edit files
- Staging Area (Index) — where you prepare changes for a commit
- Repository (.git) — where commits are stored permanently
Working Directory → git add → Staging Area → git commit → Repository
Ready?
In the next lesson, you'll create your first Git repository. Use the Next button below to continue.