Skip to content

CBD GitHub and RStudio Git Instructions

Michael Samuel edited this page Mar 5, 2019 · 4 revisions
  1. Create a GitHub account at https://github.com/

  1. Get setup to use Git with RStudio (more detailed instructions at https://support.rstudio.com/hc/en-us/articles/200532077?version=1.1.453&mode=desktop):
    • install Git using the appropriate method for your platform here: http://git-scm.com/downloads
    • activate Git in RStudio on your system [note: if you have installed Git a long time ago, it would be good to update or install a new version]:
      • Open R Studio
      • Go to Global Options (from the Tools menu)
      • Click Git/SVN
      • Click Enable version control interface for RStudio projects
      • If necessary, enter the path for your Git executable file in the box provided
        • it is probably in a folder like: c:\Users\YOURUSERNAME\AppData\Local\Programs\Git\bin
      • As far as I can tell, ignore the "SVN Executable" and “SSH RSA Key" boxes

  1. EXIT R and get back in
    • RStudio's version control features are tied to the use of Projects
    • Create a new project based our remote CCB GitHub repository
      • Create a new project
        • (one way is:) --> File --> New Project
    • as part of creating the new project choose "Version Control"
      • Choose "Git"
      • Provide the repository URL, https://github.com/mcSamuelDataSci/CACommunityBurden, (and other appropriate options)
      • Choose an appropriate folder on your computer in which to store the project and give the project and appropriate name (e.g. "samuelCCB")--this project name will also be the name of a new folder Git will create
    • click "Create Project"

  1. (not essential, but helpful) Add/edit your user name and email to RStudio-Git in a "command window". Access a command window via the "Terminal" tab next to the "Console" tab
    • git config --global user.email "[email protected]"
    • git config --global user.name "Mona Lisa"

  1. Michael needs to add you as a collaborator before you can "push" to the CCB GitHub repository


  • to "Activate" git with a new project if needed
    • Open that project
    • Tools --> Version Control --> Project Setup
    • Select Git/SVN -> from "Version Control System" select Git -->