Intermediate Version Control#

Course Description#

This Intermediate Version Control course offers a comprehensive guide to mastering version control with Git, focusing on advanced topics and practical workflows. The course is designed to deepen your understanding of Git through hands-on exercises and real-world scenarios. Topics covered include configuring Git, working with branches and merges, understanding GitHub workflows, managing remotes, and rewriting history. The course aims to equip participants with the skills necessary to efficiently manage and collaborate on projects using Git.

Course Objectives#

  • Understand and configure advanced Git settings.

  • Master branching and merging strategies.

  • Implement effective GitHub workflows for collaboration.

  • Manage remote repositories and synchronize local changes.

  • Learn techniques for rewriting Git history and recovering from mistakes.

Prerequisite Knowledge#

Participants should have taken the Introduction to Version Control and Introduction to UNIX course, or be comfortable with the topics that are discussed throughout the courses.

Installation Guide#

Prior to the start of the course, attendees should have git, a terminal and a code editor installed, and have a GitHub account with credentials configured. We provide suggestions below, but attendees can use alternatives they are already comfortable with (except for git, which is mandatory).

If you encounter any difficulties with installation please contact the Exeter RSE group rse-group@exeter.ac.uk.

Git and a Terminal#

Git can be obtained from https://git-scm.com/. For windows users, the git installer comes with a terminal app Git Bash. For Mac and linux users, a terminal comes with your system.

Code Editor#

The lessons will include demonstrations with VS Code. Attendees familiar with another IDE or editor (such as RStudio or vim) will be able to follow along with all the exercises.

GitHub Account and Credentials#

Attendees can register for a free GitHub account at . Please follow the instructions at Managing your personal access tokens, making a note of your username and personal access token.

Acknowledgements#

This workshop was influenced by the Introduction to Version Control course for Coding for Reproducible Research (CfRR), and the Pro Git Book.

Developers#

This workshop was developed by Stephen Cook for the CfRR, with support from members of the RSE Group at the University of Exeter:

  • Linus Tata

  • Liam Berrisford

  • Tom Wilson

License Info#

Instructional Material

The instructional material in this course is copyright © 2024 University of Exeter and is made available under the Creative Commons Attribution 4.0 International licence (https://creativecommons.org/licenses/by/4.0/). Instructional material consists of material that is contained within the “individual_modules/intermediate_version_control” folders in this repository, with the exception of code snippets and example programs found in files within these folders. Such code snippets and example programs are considered software for the purposes of this licence.

Software

Except where otherwise noted, software provided in this repository is made available under the MIT licence (https://opensource.org/licenses/MIT).

Copyright © 2024 University of Exeter

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The software in this repository is adapted from software that is covered by the following copyright and permission notice:

Copyright © 2024 Software Carpentry

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.