How to clone a specific version of a git repository?

git, symfony

Solution

What I would do to tell git to use this exact version is:

git clone http://github.com/symfony/symfony.git
cd symfony

git checkout v2.0.9

One liner:

git clone http://github.com/symfony/symfony.git -b v2.0.9

Problem

I'm working with symfony2 and I want to backup my vendors in case github is not reachable. How do I clone a specific Version of a repository? I want to backup the repositories with help of the vendors-file. the syntax is something like this: ``` [symfony] git=http://github.com/symfony/symfony.git version=v2.0.9 ``` now how do I tell git to get that specific version? Is there a terminal-command like: ``` git clone --mirror http://github.com/symfony/symfony.git --version=v2.0.9 ``` Thanks in Advance

Original source