Chapter 8 Git/GitHub
Git is powerful software that tracks files on your local computer and takes care of the versioning (line-by-line!) and bookkeeping that you might otherwise do yourself, for example with filenames like analysis_final_v3.R
. GitHub is an online platform that socializes Git’s versioning capabilities, archiving your files online and enabling you to share and collaborate with others, and also opens a whole world of publishing.
Git and GitHub were not designed for scientists as primary users, so there are a lot of powerful features (branches, pull requests) that might not be immediately useful for scientists just getting started. And that’s okay! Interacting with GitHub from the browser is a fine way to start.
8.1 Git/GitHub Setup
There are several ways to interact with Git and GitHub from your computer, allowing folks to use what they are most comfortable with and/or already using in their workflows.
GitHub from the Browser - Julie Lowndes, NDCN Office Hours
- 20-minute overview and first hands-on experience from the browser (recommended as an empowering, collaborative first experience, but not for computational workflows)
GitHub Application - GitHub
- Software (GUI interface) for Mac, Windows, etc
GitHub from the Command Line
8.1.1 GitHub for R users
If you are an R user, you can interact with GitHub directly from RStudio, which enables a very streamlined workflow without extra software or need for the command line (for most daily needs).
Happy Git for the UseR - Jenny Bryan
- This is THE best resource for setting up and using GitHub with RStudio. Particularly important chapters include: Troubleshooting: RStudio, Git, GitHub Hell and Setting up GitHub from an existing project.
GitHub with RStudio - Julia Lowndes & Allison Horst, R for Excel Users
- Also see the chapter on Collaborating with others using GitHub
8.2 Fixing mistakes
- GitHub: A beginner’s guide to going back in time (aka fixing mistakes) - Melanie Frazier
8.3 GitHub Issues
GitHub for project management - Openscapes
- Assumes no previous experience or installation; based in the web browser
GitHub for publishing - Openscapes
- Assumes no previous experience or installation; based in the web browser