Overview
Teaching: 10 min
Exercises: 0 minQuestionsObjectives
- Why version control?
- Why Git?
- Make sure nobody leaves the workshop without starting to use some form of version control.
- Discuss the reasons why we advocate distributed version control.
>ls -l myproject/
myfile1.txt
myfile1_corrected.txt
myfile1.january.v1.txt
myfile1.january.v1.new.txt
myfile1.january.v1.new.corrected.txt
myfile1.january.v2.txt
myfile1.january.v2.save_chapter6.txt
...
Why Git?
We will use Git to record snapshots of our work:
- Easy to set up - use even by yourself with no server needed.
- Very popular: chances are high you will need to contribute to somebody else’s code which is tracked with Git.
- Distributed: good backup, no single point of failure, you can track and clean-up changes offline, simplifies collaboration model for open-source projects.
- Important platforms such as GitHub, GitLab, and Bitbucket build on top of Git.
- Many platforms build on top of GitHub.
- Sharing software and data is getting popular and required in research context and GitHub is a popular platform for sharing software.
- However, “Git is a four-handle, dual boiler espresso machine, not instant coffee.” [citation needed]. Git isn’t the most user friendly and has its design quirks but deep design is great and is definitely the most popular and what you are most likely to need to know.