Git 2.55.0
Git is the distributed version control system underpinning most modern software development, tracking content through a directed acyclic graph of immutable commits.
Download TAR.XZ Project website ↗Download Mirrors
Git was written by Linus Torvalds in 2005 because the kernel project lost access to the proprietary system it had been using and nothing else was fast enough. It took roughly two weeks to become self-hosting.
Why it works the way it does
Git’s model is the thing to understand, and once you do, the command line makes considerably more sense.
A commit is an immutable snapshot of the entire tree, identified by a hash of its content and its parents. Branches are pointers to commits. History is a directed acyclic graph. Almost every Git operation is either moving a pointer or walking that graph.
The confusing parts of the interface mostly come from Git exposing this model directly rather than hiding it, which is a design decision with genuine tradeoffs.
Commands that repay learning
# What actually changed, staged and unstaged
git diff
git diff --staged
# Rewrite the last commit rather than adding a "fix typo" commit
git commit --amend
# Find which commit introduced a bug, by binary search
git bisect start
git bisect bad
git bisect good v1.0
# Recover something you thought you destroyed
git reflog
# Who changed this line and why
git log -S 'someFunction' --oneline
git reflog is the one to remember. It records every position HEAD has held, which means most operations people describe as “losing work” are recoverable. Git very rarely destroys committed data.
git bisect is the other underused one. If you know a bug exists now and did not exist at some earlier commit, bisect finds the culprit in logarithmic time and can run a test script automatically.
Git 3.0 is coming
The project is targeting a late 2026 release for Git 3.0, which will bring breaking changes that have been queued for a long time. Worth being aware of if you maintain tooling that parses Git output.
Installing
sudo apt install git # Debian and Ubuntu
sudo dnf install git # Fedora
sudo pacman -S git # Arch
Distribution packages are generally fine here. Git is stable enough that being a version or two behind rarely matters.
Verify Your Download
Source tarballs on kernel.org are published with GPG signatures.