Introduction to Git and GitHub

Author

Nicholas Tierney

Published

February 17, 2026

1 Welcome

Welcome to Git and GitHub! This course will teach you version control fundamentals and help you collaborate confidently using Git and GitHub.

2 Course Materials

Materials will be added here as we progress through the course.

2.1 Prerequisites

  • No prior experience with Git or version control required
  • Some experience with R, Python, or other programming language

2.2 Learning outcomes

By the end of the course you should be able to:

  • Set up Git on a project
  • Link your local git project with an online project on GitHub
  • Understand how to use issues to track ideas or problems
  • Use branches to manage features or changes
  • Basic collaboration workflows (pull requests, merging, merge conflicts)
  • Work on new ideas and code, without the cocnerns of breaking working code
  • Collaborate with others without stepping on each other’s toes
  • Know how to resolve basic git issues
  • Identify when and where bugs are introduced

2.3 Course website

https://gentle-git.njtierney.com

2.4 Schedule

2.4.1 Version Control Fundamentals

  • The what and why of version control
    • Git vs OneDrive/Google Drive/Dropbox
  • Concepts, and terminology
    • Repo, commits, branches,
  • git vs github
  • Installation and setup
    • Git Handshake
    • Setup with git/github
    • Connect to RStudio/Positron/VS code
    • Using usethis with git
    • The (many) ways of creating a git repository

2.4.2 Git Workflow

  • Commit Early, commit often
  • What makes a good commit
  • .gitignore file
  • How to write a useful commit message
  • How to view commits / commit history
  • How to look at differences between commits
  • How to go back to another commit
  • Public vs private repositories
  • Tracking your work in github: Issues, Milestones, Labels, etc

2.4.3 GitHub and Branching

  • Using branches
    • Make changes without breaking code
    • Link every branch to an issue
    • Creating, moving between branches
    • Merging branches and pull requests
    • git hygiene
  • Practicing branching
    • Link branch and issue.
    • Resolve issue.
    • using usethis with

2.4.4 Collaborating with git

  • Forking vs branching
  • How to code review
  • How to “import” someones changes onto your machine
  • Merge conflicts
    • What, and why?
    • How to read merge conflicts
    • Resolving conflicts
  • Simulating, and practicing conflict resolutions

2.4.5 Github Actions

  • github pages
  • using github workflows to automate work
  • Linking github with Zenodo

2.4.6 git: some more technical aspects

  • Linking git with an existing project
  • Some basic troubleshooting of common errors
  • Understanding git push and git pull
  • Push an existing project to GitHub
  • git bisect to find bugs