To clone a repository and place it in a specified directory use "git clone [url] [directory]". For example
git clone https://github.com/ryanb/railscasts-episodes.git Rails
will create a directory named "Rails" and place it in the new directory. Click here for more information.
I use @Thiho answer but i get this error:
'git' is not recognized as an internal or external command
For solving that i use this steps:
I add the following paths to PATH:
C:\Program Files\Git\bin\
C:\Program Files\Git\cmd\
In windows 7:
Finally close and re-open your console.
You clone a repository with git clone [url]. Like so,
$ git clone https://github.com/libgit2/libgit2
Source: Stackoverflow.com