Git and GitHub
Git is a free and open-source version control system that tracks changes made to documents over time. It allows you to revisit earlier versions of your manuscript, methods, or scripts—essential for reproducibility and collaboration.
GitHub is a cloud-based hosting platform for Git repositories. It is widely used by researchers and developers to facilitate collaboration, version tracking, and code sharing. GitHub features such as Copilot, Issues, branching, and GitHub Pages provide powerful tools for managing projects and showcasing your work.
This tutorial series will introduce the fundamentals of using Git and GitHub in conjunction with RStudio. Topics include setting up Git locally, cloning repositories, pushing updates to GitHub, and best practices for managing collaborative work.
For more in-depth guidance, consult the UBC Library Git & GitHub workshop or the textbook Happy Git and GitHub for the useR.
Video Content (Optional)
Prefer a video walkthrough? Watch the tutorial below for an overview of collaborative writing with GitHub.
Useful Resources
- Manuscript template (view output)
- UBC thesis template in R Markdown
- Apply for a GitHub student license
- Free Tableau license for students
- Set up GitHub Copilot in RStudio
- Video: Using ChatGPT and Copilot in RStudio
- Video: Creating and managing GitHub branches
- Video: Resolving Git conflicts in RStudio
- Data Management in Large-Scale Education Research by Crystal Lewis
- usethis package documentation
- Intro Git & GitHub workshop – UBC Library
- Chapter 8 of Data Management in Large-Scale Education Research for README best practices
- Managing Personal Access Tokens
- Git command-line setup
- .gitignore configuration
- Choosing a license for your project