git + OS / Features Compatibility

Default git versions shipped by common OS distributions, and which git version is required for specific features like git switch, git restore, and init.defaultBranch. 8 combinations verified against official release notes.

git 2.43 + Ubuntu 24.04 LTS
Ubuntu 24.04 (Noble) ships git 2.43.0 in its default apt repositories — install with `sudo…
✓ Works
git 2.34 + Ubuntu 22.04 LTS
Ubuntu 22.04 (Jammy) ships git 2.34.1 via `sudo apt install git`. git 2.34 includes `git s…
✓ Works
git 2.25 + Ubuntu 20.04 LTS
Ubuntu 20.04 (Focal) ships git 2.25.1 by default. git 2.25 includes `git switch` and `git …
⚠ Partial
git 2.17 + Ubuntu 18.04 LTS
Ubuntu 18.04 (Bionic) ships git 2.17.1 — before `git switch` and `git restore` (added in 2…
⚠ Partial
git (latest, via Homebrew) + macOS (any supported)
Homebrew maintains the latest git release for macOS. Install with `brew install git`. The …
✓ Works
git for Windows (latest) + Windows 10 / 11
Git for Windows (gitforwindows.org) releases closely track upstream git and is the officia…
✓ Works
git < 2.23 + git switch / git restore commands
`git switch` and `git restore` were introduced in git 2.23.0 (August 2019). Any git versio…
✗ Incompatible
git ≥ 2.28 + init.defaultBranch configuration
`init.defaultBranch` was introduced in git 2.28.0 (July 2020). It allows configuring the d…
✓ Works