SlideShare a Scribd company logo
Real World
Stefan Saasen

Workflows
TODO Show of hands
Picture with hands/lighter/concert
git
Subversion
NO VCS

AT ALL?

you must love pain
Stefan Saasen

Atlassian Stash Development Lead

I come out nice in pictures, I know :-).

@stefansaasen
You heard

has
Cheap local branching

Full local history
Staging area
Speed

Much faster than svn

Huge community

prominent in Open Source
cryptographic integrity

Superior Merging
Distributed
ground breaking paradigm
is ground breaking
Workflow building blocks
fork

cheap branching

rebase
powerful merging
distributed

efficient
clone
Can we do a fast
Can we fix a bug for a
specific

RELEASE

HOTFIXrelease?
for the current

?
Can we

BUILD

the current code ?
Is the code for that

FEATURE
complete?

Has everybody

REVIEWED ?
the code for this feature
DIFFERENT
PEOPLE
PRODUCTS
CULTURES
DIFFERENT
PEOPLE
PRODUCTS
CULTURES
DIFFERENT
PEOPLE
PRODUCTS
CULTURES

Stash, Bitbucket, JIRA
DIFFERENT
WORKFLOWS
DIFFERENT
PEOPLE
PRODUCTS
CULTURES
We’ll cover:
1

Collaboration model

2

Branching model

3

Practices & Decisions

4

Tooling & Automation
Easy, right?

1

Which collaboration model?
I do my thing

here’s mine, who tells
john?

I do my thing, too

ANARCHY
look ma, a goat!

Fully decentralized
Anarchy
He is cool

Gatekeeper
Blessed repository with
Gatekeeper

To have your work
accepted, talk to him
Dictator
long live the King!

Lieutenants guard
the King

and Lieutenants

Blessed repository
Centralised
Shared common
repository

we share “everything”
More on Collaboration models

atlassian.com/git
+

Enterprise

=

Centralized
Metrics
Issues
Builds
They know where the
code needs to go!

Deployments
2

Which branching model?
Two common Branching Models
1

Continuous Delivery

2

Product Releases
2.2

for Continuous Delivery
Time

feature

staging

master/
production

promoted from staging, can receive hotfixes

master is in production
PR

staging is the next version
new features off staging
Hotfix

with branch names like:
username/ISSUE-KEY-summary
“

Significant branches map to a concept in
the outside world. It may be a past
release, an environment or a role.
Those branches are long-running and
stable whereas feature branches are

”

short lived and volatile.
Me, just making this up.
2.1

for Product Releases
PRJ-123-description
PRJ-123-bug-description

Time

feature
bugfix branch
branches

master

1

Central Repository
Short lived

2

One Branch per Feature

3

One Branch per Bugfix
master

Long running

2.2

PRJ-345-bug-description

Time

bugfix

release
branch

4

Release Branches

5

master is alpha / RC
Automatic merges for the win!
Automatic MERGES!

release
branch

2.2

2.1

PRJ-345-bug-description

Time

bugfix

release
branch

master
Placeholder for changes you DON’T want to merge!
release
branch

2.2.1

2.2

2.1

release
branch

2.1.4
2.1.5-SNAPSHOT

What can we do here?

We don’t want to merge
the 2.1.x version!
git merge --strategy= resolve
git merge --strategy= recursive
git merge --strategy= ours
stable
branch

2.2.1

2.2

2.1

stable
branch

2.1.4
2.1.5-SNAPSHOT

$> git checkout stable-2.2
$> git merge -s ours stable-2.1

merge commit, content
discarded
Deep breath, it’s really simple
The secret sauce

The merge protocol
The secret sauce

The merge protocol
When a branch is:

Change flows from
branch to baseline:

Change flows from
baseline to branch:

More stable than its
baseline

Continually

Never

When code complete

Continually

Release branch

Less stable than its
baseline
Feature branches

Credit: Laura Wingerd - The Flow of change
The secret sauce

The merge protocol
Release Branch
Never
merge!

Merge
continually

Master

Backport single
changes using
git cherry-pick
turbo boost!

3

Practices
What is a Pull Request?
Pull Request
I have some
code here!

Hey I have some code I
want to merge here,
take a look?

Low friction
collaboration

Can I merge
it here?
Single Repository
vs
Remote Forks
With Forks
Every one has their
remote repository

Full remote copy,
each has one

Integrator, Gatekeeper,
Tech Lead, etc.
Pros of a Single Repo
All feature
branches
available

1

Complete visibility

2

No per Dev remotes required

3

KISS
Forks
Are Great too BTW
FORKING IN
THE

ENTERPRISE
4 Reasons for...

FORKING IN
THE

ENTERPRISE

REASON 1

Great for customizing libraries
and still get bug fixes
FORKING IN
THE

ENTERPRISE

REASON 2

Great for innovation spikes
and maybe add it later
FORKING IN
THE

but still be open for changes

REASON 3

Protecting your components

ENTERPRISE
FORKING IN
THE

ENTERPRISE

REASON 4

Reduce the noise
and keep the overview for huge projects
4

Tooling & Automation
Hooks
“

Hooks are little scripts you can place in
the `$GIT_DIR/hooks` directory to trigger

”

action at certain points.
– githooks Documentation
Pre

Post
Local

Remote
Local
pre-/post-applypatch
pre-/post-commit

Remote
pre-receive
update

pre-rebase

post-receive

post-checkout

post-update

post-merge
pre-push
Code Quality
.git/hooks/pre-commit
git add -u
git commit -m "TEST checkstyle"
Starting audit...
/Users/user/[...]/com/atlassian/stash/
web/projects/ProjectController.java:
161:12: 'for' is not followed by
whitespace.
Audit done.
Commit aborted.
Branch from green builds
.git/hooks/post-checkout
$ git checkout master
master is lookin'good!
c4f3b4b has 4 green builds.
 
$ git checkout stable-2.3
DANGER! stable-2.3 is busted.
e1324fa has 2 red builds.
Get it at:
bitly.com/green-builds
What happens to CI with git?
1

An explosion of branches

2

Performance degradation of build sys

3

Building everything is expensive
1

Automatically build stable and master

2

Manually trigger feature branch builds
In Conclusion: the recipe
Conclusions
Collaboration
Model

Branching
Model
Product
workflow

Centralized

Continuous
delivery
workflow
Merge
protocol

Adopt Git
Practices

Embrace PR
Single Repo
or Forks

Automation &
CI setup
Build
automatically,
but leave
knobs!
Hooks, hooks
everywhere
Thank you for your
attention!
@stefansaasen
ssaasen@atlassian.com
www.atlassian.com

More Related Content

PDF
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
PDF
Super-powered CI with Git - Sarah Goff-Dupont
PPTX
Renan Dias: Using Alexa to deploy applications to Kubernetes
PPTX
Spring, Functions, Serverless and You- Michael Minella
PDF
Bitbucket Pipelines: Serverless CI/CD That Will Save Your Life
ODP
Insights into Chatbot Development - Implementing Cross-Platform Chatbots
PDF
AtlasCamp 2015: Plugins 2: All grown up
PDF
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar
Practical Continuous Deployment - Atlassian - London AUG 18 Feb 2014
Super-powered CI with Git - Sarah Goff-Dupont
Renan Dias: Using Alexa to deploy applications to Kubernetes
Spring, Functions, Serverless and You- Michael Minella
Bitbucket Pipelines: Serverless CI/CD That Will Save Your Life
Insights into Chatbot Development - Implementing Cross-Platform Chatbots
AtlasCamp 2015: Plugins 2: All grown up
AtlasCamp 2014: A P2 Plugin and a SaaS Platform Walk Into a Bar

What's hot (10)

PDF
Putting Cake into your CI
KEY
Ci Sucks
PPTX
Packer, Terraform & Jenkins - DevOpsBelfast March 2019
PDF
Atlassian Roadshow 2016 - DevOps Session
PDF
SplunkLive Brisbane Splunk for Developers
PDF
SplunkLive Melbourne Splunk for Developers
PDF
Innovation dank DevOps (DevOpsCon Berlin 2015)
PDF
Look, Ma! No servers! Serverless application development with MongoDB Stitch
PPTX
Voice assistants and chatbots automation
PPT
London devops - orc
Putting Cake into your CI
Ci Sucks
Packer, Terraform & Jenkins - DevOpsBelfast March 2019
Atlassian Roadshow 2016 - DevOps Session
SplunkLive Brisbane Splunk for Developers
SplunkLive Melbourne Splunk for Developers
Innovation dank DevOps (DevOpsCon Berlin 2015)
Look, Ma! No servers! Serverless application development with MongoDB Stitch
Voice assistants and chatbots automation
London devops - orc
Ad

Similar to JAZOON'13 - Stefan Saasen - Real World Git Workflows (20)

PDF
Git Ready! Workflows
PDF
Real World Git Workflows - EclipseCon Europe 2013
PDF
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
PPTX
Ultimate Git Workflow - Seoul 2015
PDF
Git Branching for Agile Teams
PPTX
Git and GitFlow branching model
PDF
PDF
Git with t for teams
PPTX
Lets git to it
PDF
Be a Happier Developer with Git / Productive Team #gettinggitright
PPTX
An introduction to Git and GitFlow
PDF
Intro to Gitflow
PDF
A Business Case for Git - Tim Pettersen
PDF
Git talk
PDF
Git basics
PDF
Agile team workflow
PPTX
HelloGit
PPTX
My Git workflow
PPTX
Git usage (Basics and workflow)
PDF
Git and GitHub workflows
Git Ready! Workflows
Real World Git Workflows - EclipseCon Europe 2013
Git workflows á la-carte, Presenation at jdays2013 www.jdays.se by Nicola Pao...
Ultimate Git Workflow - Seoul 2015
Git Branching for Agile Teams
Git and GitFlow branching model
Git with t for teams
Lets git to it
Be a Happier Developer with Git / Productive Team #gettinggitright
An introduction to Git and GitFlow
Intro to Gitflow
A Business Case for Git - Tim Pettersen
Git talk
Git basics
Agile team workflow
HelloGit
My Git workflow
Git usage (Basics and workflow)
Git and GitHub workflows
Ad

More from jazoon13 (18)

PPTX
JAZOON'13 - Joe Justice - Test First Saves The World
PPT
JAZOON'13 - Ulrika Park- User Story telling The Lost Art of User Stories
PDF
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
PDF
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
PPT
JAZOON'13 - Oliver Zeigermann - Typed JavaScript with TypeScript
PPTX
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
PPTX
JAZOON'13 - Andres Almiray - Rocket Propelled Java
PDF
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
PDF
JAZOON'13 - Nikita Salnikov-Tarnovski - Multiplatform Java application develo...
PDF
JAZOON'13 - Pawel Wrzeszcz - Visibility Shift In Distributed Teams
PDF
JAZOON'13 - Kai Waehner - Hadoop Integration
PDF
JAZOON'13 - Sam Brannen - Spring Framework 4.0 - The Next Generation
PDF
JAZOON'13 - Guide Schmutz - Kafka and Strom Event Processing In Realtime
PDF
JAZOON'13 - Andrej Vckovski - Go synchronized
PDF
JAZOON'13 - Paul Brauner - A backend developer meets the web: my Dart experience
PDF
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
PPTX
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
PDF
JAZOON'13 - Stefan Saasen - True Git: The Great Migration
JAZOON'13 - Joe Justice - Test First Saves The World
JAZOON'13 - Ulrika Park- User Story telling The Lost Art of User Stories
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Oliver Zeigermann - Typed JavaScript with TypeScript
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
JAZOON'13 - Andres Almiray - Rocket Propelled Java
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Nikita Salnikov-Tarnovski - Multiplatform Java application develo...
JAZOON'13 - Pawel Wrzeszcz - Visibility Shift In Distributed Teams
JAZOON'13 - Kai Waehner - Hadoop Integration
JAZOON'13 - Sam Brannen - Spring Framework 4.0 - The Next Generation
JAZOON'13 - Guide Schmutz - Kafka and Strom Event Processing In Realtime
JAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Paul Brauner - A backend developer meets the web: my Dart experience
JAZOON'13 - Anatole Tresch - Go for the money (JSR 354) !
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Stefan Saasen - True Git: The Great Migration

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Approach and Philosophy of On baking technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Approach and Philosophy of On baking technology
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
1. Introduction to Computer Programming.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf

JAZOON'13 - Stefan Saasen - Real World Git Workflows