In this tutorial, I will demonstrate the simplest way to maintain a Git repository of an Rproject from RStudio.


To get started, please download the interface Github Desktop.


Then, launch RStudio and create a New Project.

New Project \(\rightarrow\) New Directory \(\rightarrow\) Project Type New Project

When doing so, make sure to enable Git by checking the box “Create a git repository”, and I would recommend to check the box renv, but it is not necessary. Provide a helpful name for the repository.


In the GitHub Desktop, click on the Add button in the upper left corner and select Add Existing Repository.

After that is done, open GitHub Desktop and you will see that you can published this Repository on Github. This will create the Repository directly on Github.

You can push any changes in the repository, by clicking the “Push” button to get your RProject into Github.


Hope this helps!