Code Premix

How to clone a Git repository

πŸ“…June 26, 2021
πŸ—Git

Today we will show you how to clone git repository with HTTPS. Here we will give you step by step instruction for it.

Steps to clone Git repository

  1. Navigate to repository and copy the repo URL
  2. Open terminal and change the working directory path
  3. Execute command to clone the repository

1. Navigate to repository and copy the repo URL

Open GitHub and navigate to the main page/landing page of the git repository.

Now try to copy the repository URL by clicking on the β€œClone or download” button. You will find this button below the repository name at the right side of the page.

Make sure the URL should be HTTPS. Please refer to the image below for reference.

In the second step, you have to open the terminal. Now change the path of the current working directory to the another location where you want to clone the repository.

Refer below link if git is not installed.

How to install Git in Windows### 3. Execute command to clone the repository

At last, you have to execute the command and for that type git clone <REPO_URL>. So your command should look like below.

git clone https://github.com/<YOUR_USERNAME>/<YOUR_REPOSITORY>

Hit the above command and your repository will be downloaded locally.