Clone your Repository in GitHub

You can clone a repository from GitHub to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. GitHub lets you clone a repository and see all the data it has at that point in time. Cloning a repository pulls down a full copy of all the repository data that GitHub has at its current state. You can push your changes to the remote repository on GitHub or pull other people’s changes from GitHub. Here’s how to clone your repository.

  • On GitHub, navigate to the main page of the repository.
  • Above the list of files, click  Code.
  • When cloning your repository using HTTPS, under “Clone with HTTPS”, click “copy to clipboard” logo. To clone your repository using an SSH key, including a certificate issued by your organization’s SSH certificate authority, click Use SSH, then click “copy to clipboard” logo. And to clone a repository using GitHub CLI, click Use GitHub CLI, then click “copy to clipboard” logo.
  • Open Git Bash.
  • Change the current working directory to the location where you want the cloned directory.
  • Type git clone, and then paste the URL you copied earlier.
$ git clone
  • Press Enter to create your local clone.
$ git clone
> Cloning into `Spoon-Knife`...
> remote: Counting objects: 10, done.
> remote: Compressing objects: 100% (8/8), done.
> remove: Total 10 (delta 1), reused 10 (delta 1)
> Unpacking objects: 100% (10/10), done.

Leave a Comment

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