10  Setting up Git and GitHub

After having read about Git during the reading task in , you now need to setup Git to be ready for the workshop. In order to use Git properly, you need to set some options that tell Git your name and email address so that Git can use that information when recording changes you make to your files. You’ll learn more about that and how it looks like during the workshop. For now, you just need to run one of the r3 helper functions to help setup Git for you. In your RStudio, go to the Console (panel “B” in ) and type (or copy and paste) the following function:

Console
r3::setup_git_config()

Hit enter and follow the instructions. Finally, type and run this next function to make sure everything is working with your setup. When you complete the survey later, you will need to copy and paste the output of this function. For now, run it to confirm everything is setup properly.

Console
r3::check_setup()

If everything is fine, you should see something that looks like:

Checking R version:
✔ Your R is at the latest version of 4.4.3!
Checking RStudio version:
✔ Your RStudio is at the latest version of 2025.05.1.513!
Checking Git config settings:
✔ Your Git configuration is all setup!
  Git now knows that:
  - Your name is 'Luke W. Johnston'
  - Your email is 'lwjohnst@gmail.com'

After you are done, you need to create a GitHub account. Remember or record your username, as we will ask you for it in the pre-workshop survey. Make sure to remember your password, ideally saving it in your password manager if you installed one already or during the pre-workshop tasks so that it can store your password for you.

Note

GitHub is a company and website (like Google), while Git is a software (like R). There is sometimes confusion about these two things since they both say “Git”. It’s important to distinguish that they are two separate things.