Version control makes it is easy to share code, collaborate on the same project, and keep track of all the changes in your code.
Here we will guide you through the process of installing git, connecting RStudio and GitHub and explain the basic workflow.
Git is a version control system, which manages the evolution of files. GitHub is a online tool using the software git to store data and track changes. GitHub can be used with any files but works best with text files, for example R scripts. Here we will focus on using git and GitHub with RStudio.
Let’s start with explaining the basic workflow briefly. On GitHub you can make repositories, which is a kind of project. Your online repository, or short repo, is called remote. To use your repository, you need to clone it locally onto your computer and it is then called local. You can write and edit R code locally on your computer. The new code is then committed and pushed back to the remote. If you follow this workflow consistently, GitHub will keep track of all the changes you make.
For the sake of this tutorial, Kingsley and Angelina will show us the workflow with RStudio and GitHub.