A Git Setup

To participate in the git lesson, you need to:

  1. Download and install
  2. The location of the Git executable in RStudio is set in Tools > Global Options… > Git/SVN as shown in the screenshot below. The default location of /usr/bin/git won’t work for most people, so set the location of Git executable as follows:
    • Windows = C:/Program Files/Git/bin/git.exe
    • OS X = /usr/local/bin/git
    If you need to change this location setting, you will need to restart RStudio for the new Git location to apply.
  3. Setup your SSH RSA key if necessary in RStudio - if your SSH RSA key is (none) instead of ~/.ssh/id_rsa or similar, then click on the button to Create RSA key…
  4. Have a github.com account, and
  5. Copy your SSH RSA key to github.com - in the RStudio window below click on View public key and copy the public key to your account as explained in step 2 onwards: https://help.github.com/en/articles/adding-a-new-ssh-key-to-your-github-account Make sure to test your GitHub connection by opening a shell in RStudio using Tools > Terminal > New Terminal and run the command to test your account as described in https://help.github.com/en/articles/testing-your-ssh-connection otherwise you may run into trouble with RStudio prompt window overflowing with the authenticity prompt.
  6. Install the tidyverse and modelr packages in RStudio.

A.1 Git for Windows installer

These instructions1 are for Windows only:

  1. Click on Next four times (two times if you’ve previously installed Git). You don’t need to change anything in the Information, location, components, and start menu screens.
  2. Select Use the nano editor by default and click on Next.
  3. Keep Git from the command line and also from 3rd-party software selected and click on Next.
  4. Click on Next.
  5. Select Use the native Windows Secure Channel library, and click Next.
  6. Keep Checkout Windows-style, commit Unix-style line endings selected and click on Next.
  7. Select Use Windows’ default console window and click on Next.
  8. Leave all three items selected, and click on Next.
  9. Do not select the experimental option. Click Install.
  10. Click on Finish.

  1. These Git Windows installer steps are from the Software Carpentry setup page.