- R project management series -
Athanasia Monika Mowinckel
31.03.2022
Part I - RStudio projects
Part II - Organising your files and workflow
Part III - Package / Library management
Part IV - git & GitHub crash course!
Part V - quarto / Rmarkdown
git - what?version control system
tracks changes in files and folders
tracks changes to text in text files
command line based
![]()
git - why?tracks all changes to files
with comments
with information on who did the change
with timestamp
![]()
git - why?changes can be undone, without loosing history
changes from different users that “collide” need human interaction to resolve
only changes are saved, so storage space needed is small
![]()
cloud storage system
storage of git data
online git collaboration platform
could be any of many such services:


| command | where | meaning |
|---|---|---|
| repository / repo | a git project, has a .git folder with all information about the files and history of files. | |
| clone | repo copy | Create a local copy of entire repo, with all history and files. |
| fork | repo copy on GitHub | A copy of the entire repo, with all history and files, on GitHub |
| command | where | meaning |
|---|---|---|
| pull / fetch | GitHub to local | get update from GitHub on new files and changes |
| push | local to GitHub | send local changes to GitHub |
| pull request (PR) | GitHub | a request to merge a branch’s into another branch |
| branch | a deviation from a main history line to isolate work on specific tasks |
| command | where | meaning |
|---|---|---|
| add | local | add changes/files to temporary cache |
| cache/stage | uncommitted storage | files and changes added to git, but not yet committed to memory. Temporary, forgettable storage |
| commit | commit cache to history | commit everything in cache to git history with a message |
Make sure that files/folders that contain certiain information does not end up in your repository
Use the .gitignore` file to make sure things never are added to git history
> cat .gitignore
data/
my_file.txt
# R stuff to ignore
.Rhistory
.Rproj.user
# Mac hidden storage
.DS_Store
