9 – 12h Teaching
Teacher:
git help
Why version control, and what is it?
git help <command>
.git
, restore with git checkout -- .
(optionally when offline)gitk
.git/
Can be used completely offline.
.git
and .git/objects/
againCopy questions file from powercoders repository.
git status
and read the output after every operation. Command is new best friend..git/objects/
againAccidentially delete questions file
Check the logs
git log
and in gitk
git help log
Theory
Git Areas
Commits
.git/objects/
)Diff between two arbitrary snapshots.
HEAD^
Undo changes in staging area and workspace
Create branch with new directory
gitk
and git log --decorate
food
with file favourite.md
, commitSwitch Branches
best-about-git.md
and commit itTheory
Branches
.git/refs/heads/
master
remains stable.Merge Conflict Scenario: Two people working on the same file
feature/beverage
to favourite.md
master
Rebasing a branch
Theory
Rebase; show with D3
pull
always with rebaseStash changes and get them back
git status
, git log
, gitk --all
git pop --index
Remotes
Theory
12 – 13.30h Lunch
13.30 – 17h Coaching
Coaches:
pull --rebase