Introduction to Git and GitHub

beginner
github

Benefit from Git and GitHub’s power to facilitate collaborative research and code management practices.
Image credit: NCEAS Learning Hub

Description

Every file in the scientific process changes. Manuscripts are edited. Figures get revised. Code gets fixed when bugs are discovered. These changes are essential to track, and yet, we often use simplistic filenames to track them. Is there a better way? YES, version control. Version control provides an organized and transparent way to track changes in code and additional files. Git is a version control software, and GitHub is a website that allows users to store their Git repositories and share them with others. This lesson is a friendly introduction to these tools. It explains the main concepts and walks you through the Git and GitHub workflow using RStudio.

Prerequisites

  • Familiarity with R and RStudio
  • Have a GitHub account (sign up at github.com)
  • Have Git installed on your computer (see instructions here)

Learning Goal

  • Apply the principles of Git to track and manage changes in a project
  • Utilize the Git workflow, including pulling changes, staging modified files, committing changes, pulling again to incorporate remote changes, and pushing changes to a remote repository
  • Create and configure Git repositories using different workflows

Duration

2 hours