Introduction
Git Hygiene
Figure 1

Branching
Figure 1
Basic GitHub Branches
Figure 2
A linear Git History on the
main
branch showing the position of HEAD
.Figure 3
Relative Refs on a Git Branch
Diverging Branches
Figure 1
Diverging branches in
python-maths
:
ns-rse/2-square-root
is now behind the main
branch which has incorporated the changes from
ns-rse/1-zero-division
.Figure 2
Before - diverged branches in
python-maths
: ns-rse/2-square-root
is now
behind the main
branch which has incorporated the changes
from ns-rse/1-zero-division
.Figure 3
After -
main
,
which has already had the work in ns-rse/1-zero-division
merged into it, is merged into ns-rse/2-square-root
.
Development is completed on ns-rse/2-square-root
and the
feature merged into main
.Figure 4
Before - diverged branches in
python-maths
: ns-rse/2-square-root
is now
behind the main
branch which has incorporated the changes
from ns-rse/1-zero-division
.Figure 5
After - rebase to bring the
diverged branch up-to-date with
main
which includes
ns-rse/1-zero-division
. Two more commits are made and
ns-rse/2-square-root
is then merged into
main
.Figure 6
Hooks
Continuous Integration
Additional Topics
Further Resources
Figure 1
