What is Git?
The version control system that won — how it thinks, and the three words you'll use forever: repository, commit, local.
In 2005, Linus Torvalds — yes, the creator of Linux — needed a version control system good enough for thousands of developers working on the Linux kernel. Nothing available satisfied him. So he wrote his own in about two weeks (!) and named it Git.
Git won so completely that today it's less 'a popular choice' and more 'how software is made': ~95% of developers use Git. Every company you might work at, every open-source project you might join — Git.
The name? British slang for an unpleasant person. Linus joked he names projects after himself. 😄
Three words carry the whole mental model — worth learning slowly:
- Repository (or repo) — your project's history database. It lives in a hidden folder called
.gitinside your project folder. Project + its whole history, together in one place - Commit — one snapshot: the recorded state of your files at a moment, plus a message saying what changed and why. (The word is both a noun — 'a commit' — and a verb — 'to commit changes')
- Local — Git runs entirely on your machine. Committing needs no internet, no server, no account. Your repo is fully yours
So: a repository is a photo album 📸; each commit is one photo with a caption; and the album lives on your own shelf.
What is a commit?
- AA recorded snapshot of your project at a chosen moment, with a message describing it
- BA copy of your project uploaded to the internet
- CA single edited line of code
- DA promise to finish a feature
Where does a Git repository live?
- AIn a hidden .git folder inside your own project folder, on your machine
- BOn Git's central servers
- CIn the cloud, synced automatically
- DIn the operating system's registry
You're on a plane with no Wi-Fi, editing your project. Can you make commits?
- AYes — Git is fully local; commits need no internet at all
- BNo — commits must reach Git's servers
- COnly if you bought in-flight Wi-Fi
- DYes, but they're deleted on landing
- Git = the version control system that won (~95% of developers), created by Linus Torvalds in 2005
- Repository (repo) = your project's history database, in a hidden
.gitfolder inside the project — the photo album 📸 - Commit = one snapshot + message — one captioned photo
- Git is local: full history on your machine, no internet or account required
So… where does GitHub fit? Next lesson unties the world's most common Git confusion.