Using a software tool to handle the versions of your project files lets you focus on the more interesting/innovative aspects of your project.
- Version control’s advantages
- It’s easy to set up
- Every copy of a Git repository is a full backup of a project and its history
- A few easy-to-remember commands are all you need for most day-to-day version control tasks
- The GitHub hosting service provides a web-based collaboration service
- Two main concepts
- commit: a recorded set of changes in your project’s files
- repository: the history of all your project’s commits
- Why use GitHub?
- No need for a server: easy to set up
- GitHub’s strong community: your colleagues are probably already there
Overall
Version control might be the most important topic we teach, but Git is definitely the most complicated tool. However, GitHub presently dominates the open software repository landscape, so the time and effort required to teach fundamental Git is justified and worthwhile.
Because of this complexity, we don’t teach novice learners about many interesting topics, such as branching, hashes, and commit objects.
Instead we try to convince them that version control is useful for researchers working in teams or not, because it is
- a better way to “undo” changes,
- a better way to collaborate than mailing files back and forth, and
- a better way to share your code and other scientific work with the world.
Hosting
A common concern for learners is having their work publicly available on GitHub. While we encourage open science, sometimes private repos are the only choice. It’s always interesting to mention the options to have web-hosted private repositories.