git is a version control software. With it, you can download repositories, track your changes and develop code collaboratively.

install git

This is tedious, but needs to be done only once.

  • Create a github account at
  • Download and install git, see
  • Restart Rstudio (if open)
  • Connect git to Rstudio: (instructions with screenshots)
    • RStudio -> Tools -> Global Options -> Git/SVN: Ensure the path to the Git executable is correct.
    • Create SSH Key, close window
    • View public key: copy the displayed public key
    • go to and click New SSH key, paste the public key
    • in the RStudio bottom Tab Terminal: type the following:
    git version # just to see git works fine
    git config --global ""
    git config --global "YourUserNameHere"

use git

To clone a git repo, Rstudio handles most the work for you.

    1. At Rstudio - File - New Project - Version Control - Git,
      paste the repository URL, set the subdirectory and create project.
      I recommend to keep the Project directory name so local and github folder names match exactly.

    1. From now on, get the latest version with a single click on Pull:

git resources

Happy Git with R:
Excellent tutorial on git in general (mostly without Rstudio):
HPI course:
Contribute to OS software: