Skip to content

2.4. Git and Github


Git and GitHub for Beginners

If you’ve ever worked on a project where multiple people send you different versions of the same file - analysis_v2_final_FINAL.xlsx - you’ll appreciate why Git exists.
Git is a version control system that keeps track of every change you make to your files, while GitHub is an online platform where you can store those files and collaborate with others.

Think of Git as Track Changes for your code, and GitHub as the shared folder where you and your teammates store those tracked changes.


Why You Should Use Git & GitHub

  • No more overwriting each other’s work - multiple people can edit without breaking things.
  • Full history - you can go back to see what changed, when, and why.
  • Safe experimentation - create branches to test new ideas without touching the main project.
  • Easier collaboration - share code, notebooks, documentation, and even data dictionaries.

Installing Git

Install Git on Windows

  1. Download Git for Windows from git-scm.com.
  2. Run .exe file and follow promps.

Configure Git

git config --global user.name "Your Name"
git config --global user.email "your@email.com"

Install Git in WSL

sudo apt update
sudo apt install git

Configure Git

git config --global user.name "Your Name"
git config --global user.email "your@email.com"

Github

This course will use Github, but your work may already have repositories setup.

For Github simply create an account with your personal or work email and set up multi factor authentication.