Install guide · Debian 12 (bookworm)printed 28 Oct 2026, 09:52 UTC
Install Git 2.56 on Debian 12
Debian 12 ships Git 2.39.5. The current release is 2.56.0. freshdeb builds it for bookworm from upstream's release with Debian's packaging, so it replaces the distribution's package in place and updates with apt upgrade like the rest of the system.
- Debian 12 ships
- 2.39.51:2.39.5-0+deb12u3
- main
- 2.56.0follows every upstream release, minors and majors included. Currently 2.56.0.
- Built for
- amd64 and arm64, natively
Not published yet. The first git release is being built. These commands work once it lands; the version shown is the one it will publish.
1Trust the signing key (once per machine)
sudo install -d -m 0755 /etc/apt/keyrings curl -fsSL https://deb.freshdeb.com/freshdeb-archive-keyring.gpg \ | sudo tee /etc/apt/keyrings/freshdeb-archive-keyring.gpg >/dev/null
Fingerprint 3BBD F03A 9C0B F890 F8CA 9510 7595 CC55 468F 3161. How to verify.
2Add the source for bookworm
sudo tee /etc/apt/sources.list.d/freshdeb-git.sources >/dev/null <<EOF Types: deb URIs: https://deb.freshdeb.com/git Suites: bookworm Components: main Signed-By: /etc/apt/keyrings/freshdeb-archive-keyring.gpg EOF
3Install
sudo apt update && sudo apt install git
apt policy git # expect 1:2.56.0-2+freshdeb~deb12Already on Debian 12's Git? The same command upgrades it: the freshdeb version sorts higher. What's different from Debian's package.
Upgrading from Git 2.39.5
Configuration and data stay where Debian put them.
- Also
- Repositories and configuration carry over unchanged: nothing to do after the upgrade.
Going back to 2.39.5
Delete /etc/apt/sources.list.d/freshdeb-git.sources, run sudo apt update, then sudo apt install git=1:2.39.5-0+deb12u3: apt asks before it downgrades. Name the other git packages you installed with their Debian 12 version too.
Why a package
On Ubuntu, the git-core PPA also has current releases. This repository covers Debian as well, keeps Debian's package split (git, git-email, git-svn, gitk, …) and is built from kernel.org's release tarballs.