3.3 Workflows

Helene Wagner

1. Goals

The main goal of this section is to help you get over the most intimidating first steps and become familiar with workflows that will get you started on a collaborative research project using R and GitHub.

  • Master a basic workflow (fine if working alone)
  • Embrace a safe workflow (recommended for collaboration)
  • Learn to resolve a merge conflict

The tutorials provide step-by-step instructions, illustrated with screenshots. In addition, they introduce key concepts and provide some recommendations to get you, and your group, off to a safe start.

The focus lies on workflows that use RStudio’s built-in git functionality and complement it with GitKraken. We thus avoid using git commands in the Terminal.

2. Step-by-step tutorials

These tutorials build on each other and should be worked through in sequence, unless you have prior experience with these topics.

  1. Basic workflow tutorial: First steps with your cloned repo: pull, commit, push
  2. Safe workflow tutorial: A safe workflow for collaboration: branch, pull request, merge, delete
  3. Merge conflict tutorial: Surviving your first merge conflicts

These tutorials are currently in a beta version. Please use the “Comment” feature in the Google docs to suggests changes that could help other users. Thanks!

3. Further resources

GitKraken is providing a series of brief videos that explain relevant concepts and show specific actions:

Git Tutorials by GitKraken

These videos are organized in three lists:

  • Beginner videos: what is a repository, what is a commit, how to commit, etc.
  • Intermediate videos: how to merge, how to stash, how to cherry pick, etc.
  • Advanced videos: how to resolve a merge conflict, etc.