A demonstration of using version control software with Rstudio.
git
in the Terminal
window. (Do you get a short 1-2 line error message or more than 30 lines
of usage information?)Terminal
window
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
usethis
and
gitcreds
are installed. Type library(usethis)
and library(gitcreds)
to check. If you get an error install
them using install.packages("usethis")
and
install.packages("gitcreds")
usethis::create_github_token()
.
This will open up a web browser. You will be asked to login and perhaps
use two factor authentication. Enter a note to describe the token and
pick an expiry date (I suggest a date shortly after the end of this
course.) Make sure you have at least the following boxes checked: repo,
user, workflow. Click the green generate token button at the bottom of
the screen.gitcreds::gitcreds_set()
, enter,
and then enter the PAT by pasting it into the console.