I want to install Git on Debian 9.
I ran apt install git-all
as it says on Git site but it installed version 2.11.0
.
I thought that there was a need for packages update, but apt-get update
and apt-get upgrade
didn’t change anything. It appears that this Git version is the latest stable for Debian 9.
I want to use a more recent Git version. What is the best I can do?
2
Answers
In order to run the latest Git version, I followed the instructions on Installing from Source on the official Git site.
Maybe a backports version for the Debian release you are using provides a more recent git version which satisfies your requirements.
Taking the Debian 11 (bullseye) release as an example, bullseye‘s default git package is on version
2.30.x
, whereasbullseye-backport
‘s git is on version2.34.x
. This more recent git version is especially desirable as it allows to sign commits with SSH keys.First you need to add the bullseye-backports package source to your bullseye system (I don’t know if e.g. the older stretch would allow to use bullseye-backports), then after an
apt update
, you will be able to install the backports git package: