This is the introductory lesson to version control using Git. It is assumed to be the very first thing done in a course. This lesson has been designed so that the first 45 minutes are spent on learning to make commits. After that the idea is to take small steps to make more complex arrangement. The goals of the module as a whole are that the user will feel comfortable about staging changes, committing them, merging, and branching. The guacamole example that we use is inspired by Byron Smith, for original reference, see this thread.
If you are interested in the Git-aware prompt you can find it on GitHub.
In this introduction we will mention and use GitHub but also GitLab and Bitbucket allow similar workflows and basically everything that we will discuss is transferable. With this material and these exercises we do not endorse the company GitHub. We have chosen to demonstrate a number of concepts using examples with GitHub because it is currently the most popular web platform for hosting Git repositories and the chance is high that you will interact with GitHub-based repositories even if you choose to host your Git repository on another platform.
For a complete beginner exposed to version control the half day schedule is too dense. The sections “Using the Git staging area” and “Git under the hood” can be skipped if time is tight. “Using the Git staging area” can also be given as a homework assignment. The short section “Remotes and GitHub” is here because we are exposed to GitHub in another lesson on the same afternoon. Otherwise it can be skipped or moved to another module.
Why version control?
What is Git?
What is a repository?
How does Git operate?
How do I make commits?
How do I select what to commit?
How can I undo things?
|10:50||Branching and Merging||
How can I or my team work on multiple features in parallel?
How to combine the changes of parallel tracks of work?
What is branching and when should I do it?
How can I permanently reference a point in history, like a software version?
|11:25||Sharing repositories online||
How can I set up a public repository online?
How can I clone a public repository to my computer?
How does version control scale from 1 to N users per repository?
How can we resolve conflicts?
How can we avoid conflicts?
|13:10||Using the Git staging area||
Why do we recommend to first add, then commit a change?
How can I reason about what to commit in a single commit?
|13:35||Git under the hood||
Where are commits stored?
What are branches really?
|13:55||Interrupted work||How can Git help us to deal with interrupted work and context switching?|
|14:05||Aliases||How can I remember all these Git command options?|
Catching up if something takes more time
Support for installing things for tomorrow