Version Control

Stat 251

2026-01-15

Version Control

Version control is the answer to this file naming problem.
Image Source “Piled Higher and Deeper” by Jorge Cham www.phdcomics.com

Introduce yourself to git

In a system terminal, run…

git config --global user.name 'YOUR NAME HERE'
git config --global user.email 'YOUR EMAIL HERE'
git config --global --list # check to see it worked

Alternatively, in R run:

usethis::use_git_config(user.name = 'YOUR NAME HERE', 
                        user.email = 'YOUR EMAIL HERE')
usethis::git_sitrep() # check what R knows about git

Connect Git and R

Instructions

Using RStudio and git

(Demo)

Homework: Introduction to Github

Next Time

Review: General Programming

Know how to:

  • Load a package or import a library
  • Define a variable
  • Write a function
  • Write an if/else statement
  • Create a data table structure
  • Get a column, row, or value from a data table
  • Get an item from a list