Monday, September 19, 2016

Clone a Git Repository Into a Specific Folder

Let's take a look at a sample git repository URL:
https://github.com/apolunin/java8-impatient
It can be cloned via the following command:
git clone https://github.com/apolunin/java8-impatient
The contents of the repository will be put in the 'java8-impatient' folder which will be created in a current working directory. What if we want a different one? Fortunately this is very easy to do in Git. Here is a quick but useful tip which shows how to clone a Git repository into a different folder:
git clone https://github.com/apolunin/java8-impatient my-impatient-repo
This time the contents of the repository will be put in the 'my-impatient-repo' folder under the current working directory.

No comments:

Post a Comment