Version control with Git

This course is based on materials by Software Carpentry

Prerequisites

In this lesson we use Git from the Git Bash program on Windows.

Alternatively, this course can be followed on Linux or macOS using the terminal. All of the Git commands shown will work on any OS, with the exception of the notepad command.

Linux users should use the gedit command instead, and set gedit as the core editor when configuring Git.

You will need a GitHub account for episode 7 onwards. Please sign up for an account if you do not already have an account.

Resources

Git cheat sheet (You may want to download a copy of this for reference during this workshop)

Schedule

Setup Download files required for the lesson
00:00 1. Introduction Why use version control?
00:10 2. Tracking changes with a local repository How do I get started with Git?
Where does Git store information?
00:45 3. Looking at history and differences How do I get started with Git?
Where does Git store information?
01:20 4. Commit advice How, what, and when to commit?
What makes a good commit message?
01:30 5. Branching What is a branch?
How can I merge changes from another branch?
02:10 6. Undoing changes How can I discard unstaged changes?
How do I edit the last commit?
How can I undo a commit?
02:35 7. Working from multiple locations with a remote repository What is a remote repository
How can I use GitHub to work from multiple locations?
03:00 8. Collaborating with a remote repository How do I update my local repository with changes from the remote?
How can I collaborate using Git?
03:40 9. Conclusions and further information Where can I find out more?
03:45 Finish