We will explain here 2 use cases:
[[ https://c4science.ch/w/c4science/rstudio/#you-use-r-or-rstudio-but | You use R or Rstudio but no projects, you are already versioning your work but no integration from within Rstudio ]]
]]
[[ https://c4science.ch/w/c4science/rstudio/#setting-up-from-scratch | You want to set up an Rstudio project on c4science from scratch
]]
[[ https://c4science.ch/w/c4science/sshkeys/ | Both use cases need SSH keys to be already set up. ]]
# 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`
File -> New project
Existing directoryand choose `Existing directory`
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)
Choose the directory (if you launched Rstudio from it it should be already there) and Create project. This,The system is smart enough to detect if you are using Git. in praccticeOn the bar, will create an .Rproj file and modify your .gitignore (check it out with git diff .gitignore)you should see a small "Git" icon.
The system is smart enough to detect if you are using Git. On the bar, you should see a small "Git" icon.{F230285}
From the Git icon, you can do all the common Git operations you would do on the command line.
## Committing:
If you choose `Git -> commit...`, you will be presented with the "Review Changes" panel, which is pretty straightforward. TouYou 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