Skip to main content

RStudio Git

Use Git in RStudio

Create RStudio Project from Git Repository

  • Option "RStudio Web": Log in with your uzh shortname at https://rstudio.math.uzh.ch
  • From the "File" menu select "new Project...". [image: 01_rstudio_file.png]01_rstudio_file.png
  • In the dialogue choose "Version Control". [image: 02_version_control.png]02_version_control.png
  • Next choose Git. [image: 03_git.png]03_git.png
  • Enter the URL of your Git repository and choose a unique name for the project directory. Change the Project location if you like. Then press "Create Project". [image: 04_create_project.png]04_create_project.png
  • Enter your Git server login in the dialogue. Usually this is your uzh shortname and password. (Reset Password on Windows: link) [image: 05_login.png]05_login.png
  • If the project was created successfully you will now see the project path and the project files in the Files panel (bottom right panel). [image: 051_finished.png]051_finished.png

Commit and Push to the Repository

  • From the "Git" menu select "commit". [image: 06_commit.png]06_commit.png
  • In the newly opened window choose the files that you would like to commit and write a commit message. It won't work if you leave the message empty! Then press "Commit". [image: 07_choose_files.png]07_choose_files.png
  • Check whether there were any errors and then the close the dialogue. [image: 08_close.png]08_close.png
  • Click on "push". [image: 09_push.png]09_push.png
  • Enter your Git server username and password in the dialogue. Usually this is your uzh shortname and password. (Reset Password on Windows: link)
  • Check whether there were any errors and then the close the dialogue. [image: 10_push_success.png]10_push_success.png