In many cases where Git is involved it’s possible ethat your distribution doesn’t offer the version of git that is appropriate to the software you want to run. In this case you can install from sources.
Here is one method fro example to install the version 2.4.3.
Remove packaged Git
apt-get remove git
If you have other packages that depend on git , apt will most probably prevent the de-installation of git. In that case you can run the following command:
dpkg --force-depends -r git
apt-get install -y libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
Download and compile from source
curl -L --progress https://www.kernel.org/pub/software/scm/git/git-2.4.3.tar.gz | tar xz
make prefix=/usr/local all
Install into /usr/bin
make prefix=/usr/local install
Check the git version