Git branching
a short walkthrough
“A reference to
a bunch of commits”
The basics

•

Local branches

•

Remote branches

•

Pull requests
Continue not!
A time for demo it is…
Aye sir, a model!
•

No rules…

•

Guidelines & naming conventions
!

•

“A successful Git branching model”

•

Vincent Driessen (http://nvie.com/)

•

git-flow
Main branches
•

Continuous integration

•

master

- Production (ready)

•

develop

- Should be kept stable

- Nightly builds

•

“Infinite lifetime”
Supporting branches
•

Feature branches

•

Release branches

•

Hotfix branches

•

“Limited lifetime”
Feature branches
•

“Topic branches”

•

Create out of develop

•

Merge into develop

•

Naming, pick anything but:

- master

- develop

- release-*

- hotfix-*
git merge --no-ff
Release branches
•

Create out of develop

•

Merge into develop 

or master!

•

Naming: release-* (versions)

•

Purpose:

- Preparation for release

- Minor bug fixing (after testing)

- …

- Keep development ongoing

•

Tags (when merging)
Hotfix branches
•

Create out of master

•

Merge into master 

and develop!

•

Naming: hotfix-* (versions)

•

Purpose:

- Critical bug fixing

- Keep development ongoing

•

Tags (when merging)
git-flow
https://github.com/nvie/gitflow
Questions?

Git branching