Definition
What it is
Git is not a file server. It is a content-addressed database of objects (blobs, trees, commits, tags) identified by SHA-1 (now SHA-256 in experimental mode). Every operation — commit, merge, rebase, checkout — works by writing or moving pointers in this object graph. Two developers can work offline for weeks and merge cleanly because the graph never needed a central server to authorize the write.
The design goal, stated by Linus Torvalds in 2005, was speed, simplicity and support for non-linear development with thousands of branches.
Why it matters
GitHub, GitLab, Bitbucket, Codeberg, Gitea — all are interfaces over Git. Every deploy pipeline, every code review, every changelog is a Git artifact. A developer who cannot navigate Git commits, branches and merges cannot collaborate in 2026.
Git vs SVN vs Mercurial
Aspect | Git | SVN | Mercurial |
|---|---|---|---|
Model | Distributed DAG | Centralized tree | Distributed DAG |
Speed | Very fast | Medium | Fast |
Branching | Cheap (pointer) | Expensive (copy) | Cheap |
Ecosystem | GitHub, GitLab, etc. | Legacy | Less common |
Learning curve | Steep | Shallow | Medium |
The Git model
graph LR W[Working tree] -->|git add| I[Index] I -->|git commit| R[Local repo] R -->|git push| Rem[Remote] Rem -->|git pull/fetch| R R -->|git checkout| W style R fill:#E8F5E9
How to use Git well
Git hygiene
One concern per commit
If the message has "and" twice, split the commit.
Commit messages that survive `git log --oneline`
Imperative subject ≤50 chars, blank line, wrapped body ≤72 chars explaining why.
Rebase local, merge shared
Rebase your local branch onto main before opening a PR. Merge feature branches with
--no-ffto preserve the event.Never rebase main
Rewriting main breaks every clone.
Use `--force-with-lease`, never `--force`
Protects against overwriting someone else's push.
Common failures
Origin
In 2002–2005 the Linux kernel used BitKeeper, a proprietary VCS. When BitKeeper's license was revoked in April 2005, Linus Torvalds wrote Git in two weeks as a replacement. The first self-hosting commit (Git committing itself to itself) was April 7, 2005. Git 1.0 shipped in December 2005. Today it is maintained by Junio Hamano and the community.
I'm an egotistical bastard, and I name all my projects after myself. First Linux, now Git.
— Linus Torvalds, 2005 (self-attributed; "git" in British slang means "unpleasant person")
Evidence
FAQ
- Is Git the same as GitHub?
No. Git is the VCS; GitHub is a hosting service for Git repos.
- Git vs GitHub?
Git works offline and independently; GitHub adds collaboration, CI and issue tracking.
- Reset vs revert?
Reset moves the branch pointer (rewrites history); revert creates a new commit that undoes an old one (preserves history).
- Is Git hard?
The mental model (commits, branches, remotes) is small; the CLI vocabulary is large.
Connections
Chacon, S. & Straub, B. (2014). Pro Git. https://git-scm.com/book/en/v2
Git project (2024). Git documentation. https://git-scm.com/docs
Etymology
Origin: coined
git(noun): British slang for "unpleasant person"; chosen by Torvalds self-deprecatingly
Semantic network
● broader ● narrower ● related
Used in the garden
- Unleash Linux Power: Bash Scripting Secrets for LatAm Founders (2×)
- Master Linux Automation: Bash Scripting Secrets for Solo IT Founders (2×)
- Mastering Database Schema Version Control: The DevOps Secret Weapon (2×)
- Changelog (1×)
- Rsync Over SSH: The Ultimate Incremental Backup Strategy for Solopreneurs (1×)
- Data Alchemy: Python & Bash for Spotless CSVs, Micro-SaaS Power-Up (1×)
- The Zero-Downtime WordPress Migration Blueprint for High-Stakes Sites (1×)
Sources
Chacon, S. & Straub, B. (2014). Pro Git. https://git-scm.com/book/en/v2
Git project (2024). https://git-scm.com/docs