Setting upp Git in RStudio
Prerequisites:
You will need a GitHub Account, an installation of R and RStudio.
Setting up git for rstudio
Install git
First, you will need to install git on your local machine:
Configure git in Rstudio
Then, you need to configure git in your Rstudio. For this you need your GitHub user name and the e-mail associated with your GitHub account.
1. Find your GitHub username
- Go to https://github.com and log in.
- Click on your profile picture in the top-right corner.
- Your GitHub username is shown:
- next to your profile picture on your profile page, and
- in the URL of your profile page
(for example:https://github.com/your-username).
2. Find the email address associated with your GitHub account
- While logged in, click your profile picture (top-right).
- Select Settings.
- In the left-hand menu, click Emails.
- You will see:
- your primary email address, and
- any additional email addresses linked to your account.
Important:
GitHub can hide your email from public view. The email shown in Settings → Emails is the one associated with your account and can be used for course setup or Git configuration.
Once you have the user name and e-mail address, you can follow the instructions on how to configure git in Rstudio.
You only have to follow the first point (7 Introduce yourself to Git).
Set up keys for SSH access
To be able to push changes to GitHub, you need to be able to identify you with GitHub.
Go to the following page, and follow the instructions for
Add the keys as authentication keys!
Adding a new SSH key to your GitHub account
Alternative information, with a bit more information on what SSH keys are and how they work: