Note that both the visual and the source editors offer the option to
display an outline of your document which make it easier to navigate long documents.
Then, to use version control, make sure to check the “Create a
git repository” box as highlighted in this screenshot:
Figure 5
Image 1 of 1: ‘existing project’
Figure 6
Image 1 of 1: ‘version controlled’
The final option is to continue a
version-controlled project. This is the option we will do for our
workshop.
Figure 7
Image 1 of 1: ‘Git or Subversion’
Figure 8
Image 1 of 1: ‘continue project from GitHub’
Figure 9
Image 1 of 1: ‘GitHub’
Figure 10
Image 1 of 1: ‘fork on GitHub’
Figure 11
Image 1 of 1: ‘copy GitHub repository url’
Figure 12
Image 1 of 1: ‘start my R project’
Figure 13
Image 1 of 1: ‘Git not detected on system path’
Figure 14
Image 1 of 1: ‘Global Options Git/SVN setup’
To set it up, we need to go to Tools > Global Options
Figure 15
Image 1 of 1: ‘Git menu bar’
Menu bar (Tools menu)
Figure 16
Image 1 of 1: ‘git environment panel’
Environment/History pane
Figure 17
Image 1 of 1: ‘git add commit workflow’
Figure 18
Image 1 of 1: ‘git panel add’
Figure 19
Image 1 of 1: ‘git panel add’
Figure 20
Image 1 of 1: ‘git panel icons’
Figure 21
Image 1 of 1: ‘commit in RStudio’
Figure 22
Image 1 of 1: ‘.gitignore file’
Open the .gitignore file by double-clicking on it in the file view
pane; on a new line add data/. Save the file, and don’t
forget to commit it.
Figure 23
Image 1 of 1: ‘.gitignore in git pane’
Click on the settings gear in the Git tab of the environment pane.
Click on gitignore. On a new line, add data
and click save. Don’t forget to commit the .gitignore file.
Open the .gitignore file by double-clicking on it in the file view
pane; on a new line add data/. Save the file, and don’t
forget to commit it.
Figure 8
Image 1 of 1: ‘.gitignore in git pane’
Click on the settings gear in the Git tab of the environment pane.
Click on gitignore. On a new line, add data
and click save. Don’t forget to commit the .gitignore file.