How to Install git 2.32 on Raspberry Pi

Published on August 12, 2021

Git is a software used as a distributed version control system. It is best used to keep track of team code changes, create branches, revert to previous versions and collaborate with other developers in the same team and other teams.

The Raspberry Pi OS comes with an old version of git, version 2.20.1. If you want to install the latest version of git, version 2.32.0, read on.


Current Git version

First, check the version of git that you currently have on your Raspberry Pi.

git --version

You should get something like this:

git version 2.20.1

The latest git version is 2.32.0.

Install the pre-requisites to build

First, install the pre-requisites. The second step may take several minutes.

sudo apt update
sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext

Download git source

cd /tmp/
tar -xzvf v2.32.0.tar.gz
cd git-2.32.0/

Now, make and make install. This may take several minutes.

make configure
./configure --prefix=/usr/local
make all
sudo make install

That would have installed the latest version of git. Let us test the version of git.

git --version

We should get this output:

git version 2.32.0

Let me know whether these steps worked for you. These steps worked successfully on a Raspberry Pi 3B.

Related Posts

If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.

Disclaimer: Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website.

Published on August 12, 2021