Version control with Git and GitHub
- 09:00 – 12:00 Morning session
- 12:00 – 13:00 Lunch
- 13:00 – 16:00 Afternoon session
- Interactive, workshop-style course
- Code along with the examples
- Test your understanding in the exercises
- Course notes
- All examples and exercises are in the notes
- Slides will remain online after the course
- Sticky notes/zoom reactions
- Used for getting help and giving real-time feedback
- Green = OK, ready to continue
- Red = too fast, don’t understand, computer says no etc
- Please interrupt me to ask questions
- Peer learning
- During exercises, please help each other as required
- Please try to be quiet during worked examples so everyone can
What is a version control system?
- Version control is a piece of software which allows you to record
and preserve the history of changes made to directories and files.
- If you mess things up, you can retrieve an earlier version of your
Storing versions without VCS
- Save a copy elsewhere?
- Save with a different name?
- How do you name different versions?
- What’s different between them?
- Many of copies of nearly-identical but critically different
Why use version control
To store versions properly
- VCS treats files as one project - one current version on disk,
previous versions and variations are saved in a repository
- VCS starts with a base version of the project, and only saves the
subsequent changes you make
- In order to save a new revision, a commit message is required, which
explains why the changes were made.
Changes are saved
Different versions can be
Multiple versions can be
Why use version control?
- Restore previous versions
- Understand what happened
Before we get started
- Example scenario
- Text files vs binary files
- Git vs GitHub
Check setup was a success
Hi yourusername! You've successfully authenticated, but GitHub does not provide shell access.
Why learn the commands?
The staging area
Switching to a
previous commit: “detached HEAD”
Create a new commit
Merge vs rebase
Rebase onto master
(FF) merge after rebase
Forks and Pull Requests