Upgrade Git version on Ubuntu 14.04
You need to add the Git Maintainers repository in order to get the latest Git version.
Please run these commands in order:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Then, check the version of the installed Git:
git --version
It's not always necessary to remove the existing Git before upgrading it, but if you run into any problems, do the following and then repeat the steps mentioned above:
sudo apt-get remove git
You have a second copy of git installed in /usr/local/bin
which is being used instead of the system installed git.
Without knowing how the other git has been installed, I would say that you need to manually remove the other git binary from /usr/local/bin
.