Slide 1

Slide 1 text

GITFLOW Improving the workflow

Slide 2

Slide 2 text

Projects…

Slide 3

Slide 3 text

We have to develop…

Slide 4

Slide 4 text

We have to show progress to the client…

Slide 5

Slide 5 text

The client need to release...

Slide 6

Slide 6 text

3 scenes

Slide 7

Slide 7 text

Production Staging Development

Slide 8

Slide 8 text

Scenarios

Slide 9

Slide 9 text

Production Live Staging Release Candidate Development In progress Scenarios

Slide 10

Slide 10 text

Branches

Slide 11

Slide 11 text

Production master Staging sta Development dev Branches

Slide 12

Slide 12 text

Production Live master Staging Release Candidate sta Development In progress dev Servers vs Branches

Slide 13

Slide 13 text

Each scenario is a world with his own properties and behaviours

Slide 14

Slide 14 text

Production Free of bugs Introduce only “such a tested” feature 
 Push hot fixes as priority Secure environment No directly interaction

Slide 15

Slide 15 text

Staging Try features It won’t heart to have bugs
 Fix them before merging to master Policy “What is mind? No matter. What is matter? Never mind.”

Slide 16

Slide 16 text

Development No rules.

Slide 17

Slide 17 text

Features

Slide 18

Slide 18 text

–Every client ever. “I just need this shiny thing quickly.”

Slide 19

Slide 19 text

Work this feature out

Slide 20

Slide 20 text

• Pull dev, start coding and then pushing the branch. • Once in awhile merge dev with sta and deploy. • If something is not working on staging, fix it in that branch. • If everything under staging is working, merge and push to master, deploy to production. Introducing features

Slide 21

Slide 21 text

• Pull dev, start coding and then pushing the branch. • Once in awhile merge dev with sta and deploy. • If something is not working on staging, fix it in that branch. • If everything under staging is working, merge and push to master, deploy to production. Introducing features

Slide 22

Slide 22 text

OK for Staging
 Not secure enough for Production

Slide 23

Slide 23 text

• Create a new branch base on staging. • If it is needed for collaboration, push the feature branch to origin. • After it is done (and tested), merge it to staging. • Then, delete the feature branch. Introducing features

Slide 24

Slide 24 text

With this flow the dev branch is not needed anymore

Slide 25

Slide 25 text

Branches

Slide 26

Slide 26 text

Branches Production master Staging sta Development feature/*

Slide 27

Slide 27 text

Do not merge the feature until is complete

Slide 28

Slide 28 text

Development No rules.

Slide 29

Slide 29 text

Development Only merge completed features

Slide 30

Slide 30 text

Without the dev branch we have less drama to worry about

Slide 31

Slide 31 text

Hotfixes

Slide 32

Slide 32 text

–Johnny Appleseed “Bug report #1024. Fix urgent.”

Slide 33

Slide 33 text

We have a bug on production

Slide 34

Slide 34 text

A hotfix is a fix to be done under production.

Slide 35

Slide 35 text

• A hotfix is a fix to be done under production. • Create a new branch base on master. • Code the fix and the merge it to master and sta. • After the two merges, delete the hotfix branch. Introducing hotfixes

Slide 36

Slide 36 text

If we follow each step, we are using a good workflow.

Slide 37

Slide 37 text

But the creation, merging and deleting of feature and hotfix branches can be automatised.

Slide 38

Slide 38 text

Introducing git-flow

Slide 39

Slide 39 text

Git flow is an extension for git

Slide 40

Slide 40 text

It was created to follow this steps in a bliss

Slide 41

Slide 41 text

Creating a feature with git flow

Slide 42

Slide 42 text

Creating a feature with git flow git flow feature start

Slide 43

Slide 43 text

Creating a feature with git flow …code… git add . git commit -m “My commit”

Slide 44

Slide 44 text

Creating a feature with git flow git flow feature finish

Slide 45

Slide 45 text

Create a new branch Merge it with sta Delete the feature branch

Slide 46

Slide 46 text

Feature collaboration

Slide 47

Slide 47 text

Feature collaboration To push the branch git flow feature publish

Slide 48

Slide 48 text

Feature collaboration To pull the branch git flow feature track

Slide 49

Slide 49 text

Creating a hotfix with git flow

Slide 50

Slide 50 text

Creating a hotfix with git flow git flow hotfix start

Slide 51

Slide 51 text

Creating a hotfix with git flow …code… git add . git commit -m “My hotfix”

Slide 52

Slide 52 text

Creating a hotfix with git flow git flow hotfix finish

Slide 53

Slide 53 text

Conclusions…

Slide 54

Slide 54 text

Using a dev branch…

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

Use git flow

Slide 57

Slide 57 text

Will make your release candidate (sta) branch happier

Slide 58

Slide 58 text

For a less buggy master

Slide 59

Slide 59 text

Thanks! @espinosacurbelo