Source file ⇒ lec37.Rmd
I wish to show you how to use GitHub with Rstudio. Today I just want you to set everthing up.
Here is an overview of what we are doing: http://www.molecularecologist.com/2013/11/using-github-with-r-and-rstudio/
Please create your own GitHub account https://github.com
This will take you to a new page where you will:
Your screen should look like this (except arlucas will be replaced by your Github name)
Once you click the “Create repository” button, you should see a page like this:
If you wanted to you could enter the username of your project team members (assuming that they already have a GitHub account). In the upper right-hand corner of your repositories main page, you should see a button labelled “Settings”. Click on the “Settings” button will take you to a page where you can edit various settings for your repository. Choose the “Collaborators” button on the “Settings” page (upper left) and add your neighbor’s username.
Next: Download and install the platform-specific version of Git (not GitHub), default options work well.
For Windows and Mac: http://git-scm.com/downloads
If you are a PC user you may be asked how you plan to use git command line. Choose the default which is command prompt
.
For more info (not necessary for most people):
https://support.rstudio.com/hc/en-us/articles/200532077-Version-Control-with-Git-and-SVN
our If you are a Mac user open terminal (not your virtual data science toolbox terminal but a regular terminal). If you are a PC user open up the command prompt (type cmd in the search box)
Here you want to enter your GitHub username on the first line and your GitHub email on the second line.
Here is a detailed resource on version control in Rstudio: https://support.rstudio.com/hc/en-us/articles/200532077?version=0.99.467&mode=desktop
In Rstudio
If Git executable shows (none), click Browse and select the git executable installed on your system
On a Mac, this will likely be one of
/usr/bin/git
/usr/local/bin/git
/usr/local/git/bin/git
On Windows, git.exe will likely be somewhere in Program Files
Click OK
You may need to restart your computer.
In R Studio:
Execute the New Project command (from the Project menu) Choose to create a new project from Version Control
Choose Git Provide the repository URL (and other appropriate options) and then click Create Project
Above I have circled my repository URL
The remote repository will be cloned into the specified directory and RStudio’s version control features will then be available for that directory.