Skip to content

Clone a Repository

Prerequisites

Get Repo URL

  1. Go to the github.com/hakaiinstitute/your-repository
  2. On the repository page, click on Code > HTTPS and then copy the URL

Clone Repo

  1. Copy the repository URL (see above)
  2. Open a terminal window by either
    • RStudio: Tools > Terminal > New Terminal
    • Git-Bash: Search for Git Bash and launch app
  3. In the terminal, navigate to some directory where you'd like to save this repository
    • ls -l to list available directories
    • cd ./path/to/directory/to-store-new-project
    • See using the Linux CLI for more info
  4. Run git clone [the_github_url]
  5. If prompted, enter your github username and the PAT you generated (first time you clone from github only)
  6. Change into the project directory: cd [repository-name-here]
  7. Run git remote -v to verify that the remote github URL is listed
  1. Copy the repository URL (see above)
  2. Open Positron
  3. Click New > New Folder from Git...
  4. Paste in the repository URL
  5. Select where you'd like to save this repository
  6. Click OK

Positron should clone the remote repository into the folder you specified. If prompted, login to GitHub with OAuth to allow Positron to download the repo. To verify, open the Version Control icon in the left-hand vertical menu.

  1. Copy the repository URL (above)
  2. Open RStudio
  3. Click File > New Project
  4. Select Version Control
  5. Select Git
  6. Enter the repository URL
  7. Click Create Project

You may see a pop-up to authenticate the first time you clone from GitHub.

  1. Select the Device/Browser tab
  2. Click Sign in with your browser to use OAuth
  3. Complete login to github via your browser