Introduction

In this tutorial you will learn how to get started with version control using git and GitHub. The main goal here is to provide a step-by-step introduction to GitHub, with detailed screenshots, so that you become familiar with its main functionalities.

Who

This tutorial is intended for grad students and academics who use R but are unfamiliar with the command line or terminal. I assume nothing about the computer science skills of the user, but do assume basic knowledge of R and RStudio.

What

The outline is provided in the floating table of contents. You will learn the essential concepts and terminology of version control, Git, GitHub and GitHub desktop. This tutorial follows a learn-by-doing approach.

Why

Familiarity with GitHub has become an indispensible tool for anyone working with data. Sharing code, writing software for your statistical method, producing techincal reports and creating websites have become essential skills to have in the rapidly growing field of data science. Other answers can be found here, here and here.

How

Each of the topics covered are separated by chapters that should be followed sequentially. Within each chapter, there are a series of steps that you need to complete. Each step starts with some instructions followed by a screenshot.

Pre-requisites

Chapters 1-3 have no pre-requisites in terms of software. Chapters 4-8 require a working installation of R and RStudio.

What this isn’t

It is not a comprehensive tutorial of all the intracacies of Git. I skip over many fine details, because the main goal of this tutorial is an introduction to essential concepts and terminology of version control, Git, and GitHub.

It covers a variety of topics that could each be its own book. There are a plethora of online resources available for everything covered here but you can’t Google something if you don’t know what you’re looking for in the first place.

Chapter 1: Installing Git


Introduction

Git is to GitHub, what R is to RStudio. In other words Git is the software that does all the work behind the scenes, and GitHub a user interface that makes its easier to communicate with Git (and adds functionality as well). In this chapter we will download and install Git.

Note: the screenshots provided here are from a Windows operating system, however it will be similar on a Mac or Linux.



















Step 1

Download Git