popular git workflows you haven't heard about
TRANSCRIPT
NICOLA PAOLUCCI • DEVELOPER ADVOCATE • ATLASSIAN • @DURDN
Popular Git workflowsYou haven’t heard about
Mainstream and successful workflows
Git Flow
Influential and popular with a clear consistent structure and process
Bitbucket Cloud Flow
Simple setup with two main branches: master and develop
Product Releases
To maintain older versions with long running maint. branches
Bitbucket Cloud workflow in a nutshell
mstaging
master
feature-1
feature-2
m m
release to production = merge to master
m
R H
Stable - ProductionRelease
Only merges
Workflow of Git core team
Different branching
Patches via Email
ML is the Central hubEvery code discussion happens in public on the Git mailing list
Patches sent via email and are discussed publicly until consensus
Branching structure is different than the ones you may be used to
pu - proposed updates
next
master
pu
np/topic
master - used to prepare for feature release v2.8.0
next - features in good shape may have regressions
maint
maint - maintenance fixes after releases
m m m
Git core team branching model
m
Rm m
When the team size grows, looking back at past development using branches becomes harder (not a real quote)L U K A S Z W L O D A R C Z Y KJ I R A R E L E A S E M A N A G E R , AT L A S S I A N
“”
feature
Squashin’ all and avoid merges onto master
staging
master
master uses fast-forward merges thus has just clean commits
Flat historyEasier debugging SourceTree is happy
Enforce a strict no-merges policy
A flat history may make using git blame
and bisect easier
A flat history is easier to read. Intermediate
commits are rare
Avoid the ui cluttering of an endless forest of
branches
Squashing
You can do this now with Bitbucket Server!
Fast-forwarding
On completing a PR you can now squash all commits down to a single one.
If you don’t like the clutter of merge commits you can enforce fast-forward merges.