Sometimes simply updating from "Ubuntu update" won't update/upgrade some of the required packages. We need to to it manually by adding necessary repositories. To upgrade git:
sudo add-apt-repository ppa:voronov84/andreyvIf the first command result in error "couldn't connect to host"
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git