Cloning a repository


What is a repository ?

The repository is a room, container, or place where we can store things. Github is the platform that provides this facility for the repository. The Github platform allows us to store or upload our projects on it. We can create repositories with suitable names and can store our project. Github repositories are shareable so that you can share them with anyone. Also, you can make it private.

Cloning a repository

Cloning a repository means copying all the files into your computer. Cloning makes it easier to access the code and modify it. Cloning of any repo makes it easier to commit the changes or to commit the bigger changes. It also makes it easy to remove big files and saves time.

There are some steps to clone a repository

  • On Github go to the main page of repository
  • Click on the Code option and copy the URL of repository
  • Open the git bash
  • Change the current directory to the preferred location where you want to clone the repository.
  • Type git clone and paste the copied URL

$ git clone https://github.com/USERNAME/REPOSITORY_name

Now just press Enter to create the local clone of repository