This recipe covers the installation of Git binaries on the Ubuntu server. As always, we will install the latest available Git package.
Git maintains a separate repository of the latest binaries on Launchpad. We will use PPA for this repository,to install the latest Git version:
Add PPA to the Ubuntu installation source:
$ sudo add-apt-repository ppa:git-core/ppa
Update the
apt
repository cache:$ sudo apt-get update
Now, install Git with a simple
apt-get install git
command:$ sudo apt-get install git -y
Once installation completes, you can check the Git version with the following command. You can cross check the version with the official Git download page:
$ git version
Now introduce yourself to Git by providing your name and email address. Git will add this information to every commit message made by you:
$ git config --global user.name "Your Name" $ git config --global user...