1.1 Introduction to the course
Open the slides in a new tab here.
Exercises
Install the
{usethis}
package:install.packages("usethis")
Introduce yourself to git:
usethis::use_git_config(user.name = "Louisa Smith", user.email = "louisahsmith@gmail.com")
Create a github token:
usethis::create_github_token()
This will open up your browser. Describe where the token will be used and choose an expiration date. Should you choose “No expiration”? Do as Github says, not as I do.1 You don’t need to change any of the other options. Click “Generate token”.
Copy the token. (I deleted the one in this screenshot immediately, but you shouldn’t share with anyone or save it anywhere but a password manager – treat it like a password.)
Back in R, run this code and paste your token where it says “Enter password”:
gitcreds::gitcreds_set()
You’re all set! Come back to these instructions and repeat whenever your token expires or you are using a different device.
Resources
- Happy Git With R section 7 & 9