The Git stable releases PPA has the most current stable version of Git for Ubuntu. Open the terminal and type:
sudo add-apt-repository ppa:git-core/ppa sudo apt update sudo apt install git
These commands will install git 2.3.0 (the current stable version of Git) on your system for all currently supported Ubuntu releases. A short time after a new version of git is released, git from ppa:git-core/ppa is updated to the latest version