Git is an open-source revision control system, developed by Linus Torvalds, providing a big number of features and an intuitive syntax. It is used a lot by the developers that want to share their code with others.
The latest versions of Git are available via a LaunchPad PPA, permitting the users to automatically get the latest version on their system, if the PPA is enabled.
The below instructions should work on all the supported Ubuntu systems and derivatives: Ubuntu 16.04 Xenial Xerus, Ubuntu 15.10 Wily Werewolf, Ubuntu 14.04 Trusty Tahr, Linux Mint 17.x, Elementary OS 0.3 Freya.
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git
If you want, to remove Git, do:
$ sudo apt-get remove git