Cloning a repository


Introduction

This section will guide you through the process of cloning a GitHub repository (repo). A repo contains all of your code, your files and each file’s version history. Repos can have multiple collaborators and can be either private or public. You can find out more about GitHub repos on GitHub Docs.

If you have a repo on Azure DevOps, GitHub or GitLab, you generally can’t edit or run your work on those platforms, so if you need to work with the contents of a repo, you’ll usually need to make a clone.

There are several ways to clone an existing repo. Below, you’ll find two methods. The first uses Rstudio and the second uses Git Bash. Start with step 1, which is the same for both methods, and then decide which method to follow. Once you have successfully cloned, you should see the files appear in the location you have chosen to store your repo.

Conclusion

You have successfully cloned a GitHub repository! Continue on to learn how to create branches.

Back to top