Oh it's easy! Check out the RStudio support page: https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects
Here are some links about Git:
https://medium.com/@garstep/osn-what-the-hell-is-git-6afbe634c4e8
http://rogerdudler.github.io/git-guide/
http://happygitwithr.com/
https://git-scm.com/docs/gittutorial
$ git init
Initialized empty Git repository in dir/.git/
$
$ git remote add origin https://github.com/account/repository
$
origin
is how the remote repository is named on the server, it can be named anything. Multiple repositories can be assigned to different variables in the same directory.
To check the assigned variables for remote repositories:
$ git remote -v
origin https://github.com/account/repository (fetch)
origin https://github.com/account/repository (push)
$
These first 3 steps are done only the first time the git is initiated in that directory.
$ git pull
$ git add
See what's added
$ git status
$ git commit -m "Description" filename
You can use the wild card for filename*
git push origin master