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?
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, whereas bullseye-backport's git is on version 2.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:
echo "deb http://deb.debian.org/debian bullseye-backports main" >/etc/apt/sources.list.d/bullseye-backports.list
apt update
apt install git/bullseye-backports
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With