This tutorial introduces a basic workflow for version control using git and the popular online hosting service, GitHub. The aim is to provide a starting point for researchers who want to curate and distribute their code.
-
Preliminaries Make sure that you have what you need to get started
-
Using git on the command line
- Getting started Start using git through a command line interface
- Working with version control Working on your project in the version control framework
- Connecting to a remote repository Using GitHub as remote storage for your project
- Subsequent workflow Making updates to your project
- When things go wrong A very quick intro for coping when things go wrong when you're using git
- Summary What we've learned and further steps
-
Using git through RStudio
- Setting up a version controlled project Setting up a git project in RStudio
- Getting started with version control Setting up and using version control in RStudio
- Setting up a remote repository Using GitHub as remote storage for your project
- Subsequent workflow Making further changes to your project
- Summary What we've learned and further steps
The sections of this tutorial dealing with RStudio and GitHub were adapted from (1).
(1) (Mike Croucher & Anna Krystalli. (2016). Introduction to version control with RStudio [Data set]. Zenodo. http://doi.org/10.5281/zenodo.61435)