Git and GitHub

A brief introduction

Git

  • version control system
  • works offline (repositories exist on your computer)
  • tracks changes via commits
  • has a command-line interface and integrations with GUIs (like RStudio)

GitHub

  • web-based platform built around Git
  • provides a remote location for hosting Git repositories
  • enables collaboration
  • offers other features for project management (pull requests, issue tracking)

Our Git/GitHub goals

  • For you: Keep track of progress on projects
    • Go back when you need to
    • Don’t lose old work
    • Easily search the history of a project
  • For others: Share your work
    • Have a place to store and link to code
    • Read and interact with others’ code

There is a lot to learn about this topic and I am not an expert on everything!

What we won’t cover

  • Collaboration
    • When multiple people are working on the same GitHub project, things get a little more complex
    • I went though almost my whole PhD without working on shared GitHub projects and only now do I feel semi-confident collaborating!
    • I think it’s best to figure things out in your own projects first
  • Git on the command line
    • There are a lot of functions you might hear about (git fetch, git merge, etc.)
    • RStudio and GitHub will have everything we need!