date | duration | maintainer | order | title |
---|---|---|---|---|
w01d02 |
60 |
larakattan |
2 |
Git Intro |
- (60m) Intro to Git
With this material students will learn:
- What git does
- The difference between
add
andcommit
- The difference between
git
andgithub
- How to push and pull
This lesson will introduce the ideas of version control via the git interface,
as well as teaching students how to make their own repositories.
The lecture starts by introducing the need for version control, then moves
into how commits work, what the 3 stages of git
are, and how to use git log
to see the history of a repository.
In the middle of the lecture, there is an exercise to have the students create their first repository. The code is shown in detail, in the slides, but you should also follow along so you can show them how to connect to GitHub later.
After creating a repository and doing a few commits (first as a group, then
one on their own), there is an example of reverting to a previous commit.
Discuss the difference between a hard and soft reset in git
.
The lecture then resumes by introducing the idea of a remote repository and has the students work with you to setup their first remote repository. You should show them how to create a repo on GitHub and where to get the appropriate links. Since GitHub often changes its interface, I have not put images of those in the lecture so it can be adapted to GUI changes.
Emphasize that a smart student would already be keeping repositories of their work to make sure they can always get back to a working version and their system is robust to spilling coffee on their computer.