How to Clone a Git Repository into the Current Directory

Somehow, most examples of Git’s clone command show a subfolder for the repository to be cloned into. I, for example, prefer navigating to the desired directory and like to clone into the current directory. The Git command has to be changed to appear as follows:

git clone [email protected]:your-username/repository-name.git .

git clone https://github.com/your-username/repository-name .

The ‘.’ (period) indicates the current folder.

Leave a Reply

Your email address will not be published. Required fields are marked *