02b Lecture_Git_GitHub Intro
02b Lecture_Git_GitHub Intro
Version Control
Git intro
GitHub intro
What is Version Control?
Removing bug
Adding feature
Vocabulary – general terminology
● repository - your tracked project, repo
● main (used to be master) - baseline repository
● check-in - combining your work with master
● check-out - updating your local work with latest files from
master
AGENDA
Version Control
Git intro
GitHub intro
What is “git” ?
Removing bug
Commit A Commit B
version with a bug version without a bug
20 files 20 files but one changed
• Behind the scene, git is very efficient in storing commits (versions)
• Each unique file is stored only once
Removing bug
Commit A Commit B
version with a bug version without a bug
20 files 20 files but one changed
20 files stored 21 files stored
Collection of commits contain the history of the project.
• You can review the history
• You can “undo” a change (travel back in time)
A B A
Without feature With feature Back to without feature
Working
directory
Repo
Key “git” concepts...
The files (in your working set) have 3 possible status:
1. Modified/Untracked (files are modified/new)
2. Staged (modified files are set aside)
3. Committed (staged files are safely stored into repo)
Version Control
Git intro
GitHub intro
What is “GitHub”
Picture
Demo:
Getting started
locally
Demo
1. Follow the demo
2. Submit your final work