Git & team managment

There is no perfect flow!

Naive one

All in the trunk

Main

 

All in the trunk

Main

Develop

t

Feature - 45

Feature - 45 - fix review

Review

Fix Review

All In The Trunk

have your code on main as quickly as possible

Code review is painful (multiple-commit)

Code review doesn't handle async process

SVN Style

Use case

You are the only developer on the project !

Git flow

Git Flow

Good for exploring looong feature

A lot of merge conflit to handle. The pike of work is on merge conflict.
Hard to release a bug fix in production

 

Use case

You have a popular open-source library with a announced release planning (Angular, Node.js, ...)

Github flow

Main

Github Flow

Very simple
Deploy fixes is very simple
Close to production

Conflict to handle before merging features
One environnement per feature branch (octopus)

 

Gitlab flow

Production

Staging

1 branch per envrionement/release

Merge commit

Gitlab flow

Production

Staging

1 branch per envrionement/release

HOT FIX

CHERRY PICK

Gitlab Flow

Handle multiple environnement

Conflict to handle before deploying
Conflict to handle when cherry-pick from production or other environnement

 

Trunk based

Trunk-based

Master

Release 1.1.x branch

Small feature branch

Code review and merge

Cherry picked fix

Release 1.2

tag 1.1.1

tag 1.1.0

Bug fix

Trunk based anti-pattern

Master

Release 1.1 branch

Release 1.2 branch

tag 1.1.0

Merge pain

Bug fix

Made with Slides.com