Intro to Data Science

Lab 2 – Version Control

A Guide to Your Process

Scheduling

Learning Objectives

Practice

Supporting Information

Class Discussion

Today’s Plan

  • Muddiest Point Review
  • Version Control Background
  • Navigating GitHub

Today’s Learning Objectives

After today’s session you will be able to:

  • Explain the difference(s) between Git and GitHub
  • Define fundamental version control vocabulary

Muddiest Point Review

  • Recurring topics from most recent MPs


  • What other topic(s) would you like to review?

Version Control Background

  • Version control” is a set of tools for tracking changes to a code file


  • Version control lets you work only in a single file but still preserves the history
    • No comments you’d have to resolve (like MS Word / etc.)
    • No need to “Save As” and retain many different files for each draft

Version Control Rationale

Why use version control?


Collaboration Handshake


Easily share & work together on files

Reproducibility Arrows Left Right


Fully document your progress and end results

Portfolio Book


Demonstrate your skills to others with coding know-how

Git Versus GitHub

Git logo GitHub logo

Git

GitHub

Git Versus GitHub

Git logo GitHub logo

Git

  • Actual version control software


  • Does the tracking of changes


  • Works locally on your computer


  • Not something others can interact with

GitHub

Git Versus GitHub

Git logo GitHub logo

Git

  • Actual version control software


  • Does the tracking of changes


  • Works locally on your computer


  • Not something others can interact with

GitHub

  • Graphical user interface (GUI) for Git


  • Allows viewing of Git-tracked changes
    • Not actually doing version control itself


  • Other users can see your content
    • Depending on your settings

Create a Github Profile


  • Create a profile


  • Let me know if you run into any issues!

Practice: Create a Repository

  • To practice what we’ve just covered, make a practice repository!


  • This is a test repository so:
    • Set it to “Private”
    • Create the repo with both a README and a .gitignore


  • As you go through this process, take notes for ‘future you’
    • This course will require you to make two more repositories
    • So you’ll want to have a good resource to remind yourself with down the line

Temperature Check

How are you Feeling?

Comic-style graph depicting someone's emotional state as they debug code (from initial struggle and defeat to eventual triumph)

Upcoming Due Dates

Due before lecture

(By midnight)

Due before lab

(By midnight)

  • Muddiest Point #3

Bonus Git Info

Git & RStudio

  • If desired, you can get GitHub to talk directly with RStudio
    • Done through Git!


  • Advantage is a clearer connection between your RStudio work and GitHub

Prep Steps

  1. Install R & RStudio


  1. Create a GitHub Account


  1. Install Git


  1. Connect RStudio and GitHub

Git and RStudio

  • You can work through part of an established GitHub workshop for this section