Git and GitHub

Git and GitHub are universal requirements for all emLab coding projects. Git is a version control system that tracks changes to your code on your local computer, maintaining a complete history of every modification. When you use Git, a complete history of all the changes made to your code are stored in a folder alongside your project files, known as a repository (or “repo”). GitHub is the online platform where we host these repositories and collaborate with others using tools for code review and project management. In short: Git is the tool you use locally to track changes, while GitHub is where you store and share those repositories with your team.

Why Git and GitHub?

  • Promotes transparency and reproducibility by preserving a complete, time-stamped history of changes and making it easy to recover earlier versions.
  • Improves code quality by protecting a working version as new features are developed and refined.
  • Enables collaboration by letting multiple contributors plan their approach and work in parallel with Issues, branches, pull requests, and structured code review.
  • Speeds onboarding because new team members can quickly understand project history and current priorities.
  • Supports open and reproducible science by making methods, analysis code, and revision history accessible to collaborators, reviewers, future researchers, and the public.

All emLab coding work must live in a repository under the emlab-ucsb GitHub organization. The sections below cover everything you need to know, from initial setup through advanced workflows.