You only have to set this up once per machine.

From RStudio, go to Tools > Shell and tell git your name and GitHub email by typing (use your own name and email):

These commands return nothing. You can check that git understood what you typed by looking at the output of git config --global --list.

Resources: