16 Git - Version Control

16.1 Set-up

Download and install Git

Go to Tools > Global Options > Git/SVN Make sure “Enable version control interface for RStudio projects” is selected Change the paths so they refer to the folder where Git.exe is stored (Probably C:Files). Restart RSTudio

16.3 Starting a project with Github

In GitHub create a repository, and copy its URL (eg. https://github.com/username/test.git) In RStudio Create a New Project , choosing Version Control > Git Paste in the GitHub Repository URL (from above). The project name should auto-complete. Also choose the folder where a local copy will be stored (Nb. dont use a Google Drive folder as tis casuses synch conflicts)

You can now commit-push changes to the code and these will also be updated on GitHub. The first time you you do this you might need to provie GitHub login details.

16.4 Hosting a site on Github

In the GitHub repository, click on Settings and scroll down to the GitHub pages section. Select the source were your html files are (eg. master branch) and click save. Your site will be hosted at on your account in the form : https://kierandriscoll.github.io/repositoryname/