Version control with Git

This course is based on materials by Software Carpentry

Prerequisites

In this lesson we use Git from the Unix Shell. Some previous experience with the shell is expected, but it is not mandatory. We will be explaining the necessary commands during the tutorial.

You’re invited to follow along during the Introduction to Git(Hub) session of OpenMR Virtual 2021! However, if you feel lost or too far behind, this material will help you catch up with us! We will leave this material online after the event, to leave you with a reference for your git usage!

To follow the tutorial, you can use your favorite terminal on Unix systems (any Linux or Mac OS), or WSL on Windows. If you do not have WSL or you prefer something different, you can use git bash. Please refer to the setup page if you need help in setting up git!

We will try our best to avoid using platform-dependent commands or programs, but it might happen to use a text editor. You can use your favorite one (vi, vim, gedit, atom, sublime, notepad, …) - but remember to set it as default editor when you configure git!

You will need a GitHub account for this tutorial. Please sign up here if you do not already have one!

Resources

The slides of the workshop can be found here

Several Git resources:

Glossary

Schedule

Setup Download files required for the lesson
13:00 1. Introduction What is Git?
Why use version control?
Git & Github
13:15 2. Hello git How to configure Git locally?
13:25 3. Tracking changes with a local repository How to get started with Git?
13:35 4. Looking at history and differences How do I get started with Git?
Where does Git store information?
What is a branch?
How can I merge changes from another branch?
Reverting changes
14:00 5. Git with others How do I update my local repository with changes from the remote?
How can I collaborate using Git?
What is a remote repository
How can I use GitHub to work from multiple locations?
What is rebasing?
14:30 6. Community, Contribution How can I contribute to a repository to which I don’t have write access?
14:50 Finish

Time zone is UTC.