I use git clone https://github.com/git/git.git
to clone locally and subsequently install git program. Unfortunately when the install procedure end, the version of the software is 2.12.0.rc2.2g80ba04ed9
.
How to clone the latest stable version instead of a Release Candidate?
Releases are marked with tags. Just check out the latest stable one, and build as you normally did. The current latest stable build is 2.11.1:
$ git checkout v2.11.1
For a more general approach, you could use git tag
and some shell scripting to deduce the latest stable tag automatically:
$ git checkout `git tag | sort -V | grep -v "\-rc" | tail -1`