git clone version code example
Example 1: git clone repo with name
git clone https://github.com/foo/repo_name.git new_directory_name
Example 2: git clone latest release
You can do this with the --branch flag, which will also accept a tag.
$ git clone [email protected]:mygitname/theproject.git --branch 1.0.2
In most cases, you will just want to checkout the tag as described in Exprator's answer.