Version Control with Git and GitHub

Authors

Aud Halbritter

Richard J Telford

Published

June 2, 2022

1 Introduction

1.1 Why we use version control?

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.

There are alternatives to GitHub, such as GitLab and bitbucket which offer similar services with free and paid plans. GitHub is probably the most popular and the tools used in this tutorial have been optimised for GitHub.

Definitions
  • git - version control software
  • version control - a system for keeping snapshots of your work
  • GitHub - one of several cloud-based systems for working with git