We will explain here 2 use cases:
You use R or Rstudio but no projects, you are already versioning your work but no integration from within Rstudio
You want to set up an Rstudio project on c4science from scratch
# You use R or Rstudio but no projects, you are already versioning your work but no integration from within Rstudio.
While working on Rstudio on your files, associate your work with a project with the New Project dialog:
File -> New project
Choose the directory (if you launched Rstudio from it it should be already there) and Create project. This, in pracctice, will create an .Rproj file and modify your .gitignore (check it out with git diff .gitignore)
The system is smart enough to detect if you are using Git. On the bar, you should see a small "Git" icon.
From the Git icon, you can do all the common Git operations you would do on the command line.
If you choose Git -> commit..., you will be presented with the "Review Changes" panel, which is pretty straightforward. Tou tick the files you want to "Add", add a commit message and click commit. Once this is done, you can click on "Push".
# Setting up from scratch