How to clone a GitHub repository into a specific directory using CLI

Full disclosure, I have a dislike of the command line interface especially on Windows machines.  In my humble opinion, the main advantage Windows has over Linux is the world wide acceptance of the graphical user interface (GUI).  That being said when I started using GitHub I tired a couple of different GUI clients designed to assist in the use of GitHub.  The learning curve was steep and would require more time then I am willing to dedicate.  This left the command line.  It turns out that the command line is much easier then I had expected and I was pleasantly surprised.

Here’s how you do it.

Open a command line:
Create a directory

mkdir *directory-name*

Move into the new directory

cd *directory-name*

Initialize Git

git init

Clone the desired repository

git pull *GitHub-Repository-URL*

Finished start coding.


Leave a Reply