How to upgrade GIT to premium version in CentOS

In order to use github and git is installed, version 1.7.1, chasing the new me, and think this version is a little old. Because git version 2.2 anymore. So I decided to upgrade to the latest version, you can not avoid detours, please pay attention to three or four paragraphs.
First, uninstall the old version of git.
#yum remove -y git
Second, install the new version of git
2、#tar xf v2.2.1.tar.gz
3、#cd git-2.2.1
4、# make configure
5、# ./configure –prefix=/usr/local/git –with-iconv=/usr/local/libiconv
6、# make all doc
7、# make install install-doc install-html
8、# echo “export PATH=$PATH:/usr/local/git/bin” >> /etc/bashrc># source /etc/bashrc
Third, install error
1、error: MSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127
Address: yum install TK zlib-devel openssl-devel Perl cpio Expat-devel GetText-devel
2、errro: asciidoc: command not found
Address: yum AsciiDoc
3、errro:xmlto: command not found
Address: yum xmlto
Four, testing
After the installation is complete, because is not in the system path, so you want to perform two operations, 8 write path.
#git –version
#git version 2.2.1
A final reminder, upgrade when installing git, preferably one at a timedependent.
yum install -y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel asciidoc xmlto