How Can I Install Particular git Version ?
There are a few reasons why you might need to use a particular version of Git:
1. Compatibility: Some projects or tools may require a specific version of Git in order to work properly. This could be because they were developed and tested with that specific version, or because there are known compatibility issues with other versions of Git.
2. Bug Fixes: Different versions of Git may have different bugs and issues. If you encounter a bug in a newer version of Git that is causing problems for your project, you might need to switch to an older version that does not have that issue.
3. Feature Set: Git is constantly evolving and new features are added with each release. If you want to use a specific feature that was added in a particular version of Git, you might need to use that version.
4. Stability: Sometimes newer versions of Git may not be as stable as older versions. If you are working on a critical project and cannot afford any downtime or issues, you might choose to use a more stable version of Git that has been around for a while and has been thoroughly tested.
In summary, the need for a specific version of Git can arise due to compatibility requirements, bug fixes, feature requirements, or stability concerns.
To install a specific version of Git, you need to follow these steps:
Check if Git is already installed by running the command `git --version` in your terminal. If Git is not installed, you can skip this step.
Remove : sudo apt-get remove git
Install prerequisite
sudo apt-get update
sudo apt-get install build-essential autoconf automake libtool pkg-config cmake git make gcc libtool m4 libltdl7 libltdl-dev
libxml2-dev libxml++2.6-dev zlib1g-dev gettext -y
Go to the official Git website and download the source code for the version you want to install. In this case, you can download the source code for Git version 2.25.1 from this link: https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.1.tar.gz
Extract the downloaded file by running the command `tar -xvf git-2.25.1.tar.gz`
Navigate to the extracted directory by running the command `cd git-2.25.1`
Configure Git for installation by running the command `make configure`
Run the configuration script by running the command `./configure`
Build Git from source code by running the command `make`
Install Git by running the command `sudo make install`
Check that the installation was successful by running the command `git --version`
That's it! You should now have Git version 2.25.1 installed on your system.