Git is a version control system. More broadly, think of it as a time machine
that records every change your project goes through over time.
Rather than just a tool for "saving" new data, you can think of Git as a
database designed to manage your files.
Maybe you're thinking: "I work alone, Ctrl+S and copy-paste are good enough for me." But when your desktop starts filling up with folders like "project_final", "project_final_v2", "project_ACTUALLY_final_pleaseGod" — Git is how you get out of that chaos.
This open-source tool lets you collaborate with others, travel between versions, and manage your codebase without ever fearing you'll lose your work.
It does this by taking an instant snapshot of your project. In the Git world, this is called a commit. Because Git only tracks what changed, it's incredibly fast and lightweight.
What is a Distributed System?
When you download a project to your computer (git clone), you're not just getting the latest version — you're getting its entire history. You can even travel back to any previous snapshot. It's like having an "Undo" button, but at the version level.
What is Branching?
Branching is one of Git's most powerful features for team collaboration. The
latest stable version of a project usually lives on a branch called
main or master — this is where all branches
eventually come together. Imagine your production server is running the code
on main. With Git's distributed structure, you can create your
own copy (branch) locally — no internet required — and work freely without
ever touching or breaking that stable version.
Creating a branch is essentially saying: "Don't touch the current version — I want my own local copy to work on."
What is a Merge?
So what do you actually do with your branch? You break things, fix them,
test them — and eventually it works. That's where Git's merge mechanism
comes in. Git's merge algorithm examines the code and combines your branch
with main. And don't worry — if something goes wrong, you can
always roll back.
Git vs. GitHub — they're not the same thing:
- Git: The software you install on your computer (the engine).
- GitHub / GitLab: A hosting service where you store your Git projects online and share them with others.