Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Branching strategies: choose wisely to minimise costs @phpDay Verona 2017

Branching strategies: choose wisely to minimise costs @phpDay Verona 2017

Is your team choosing the branching strategy from the beginning, or is it switching after a while to better accommodate the current project stage? How does this affect you, and what are the costs involved? Multiply this by the number of repositories, each playing a definite role in a large-scale project, and you will want to know how to minimise the impact.

In the inception phase, developers are the ones producing code, and oftentimes they choose the project branching strategy that mostly fits their immediate needs. In some teams the developers don't have DevOps knowledge, so when there is a working prototype that needs to see the light of day (err... server), they need a packagist to help them assemble the code so that it can be deployed in a specific environment, which often translates into a branching change. When the codebase matures and bug hunts start to occur, new constraints are imposed, and a more mature strategy is transitioned to.

The branching model needs to be simple - so that everyone involved can grasp it quickly, flexible - so it can serve the needs of very different roles within the project lifecycle, adaptable - when you have a particular unforeseen need, it should not be a barrier.

See what's already being used by others, ask a few questions that might drive an adaptation of your choice, then choose wisely. Then let your team spend their time on coding rather than painfully switching strategies.

Georgiana Gligor

May 12, 2017
Tweet

More Decks by Georgiana Gligor

Other Decks in Technology

Transcript

  1. ‹#›
    CHOOSE WISELY TO MINIMISE COSTS
    BRANCHING STRATEGIES
    Georgiana Gligor / @gbtekkie
    phpDay 2017

    View Slide

  2. 2
    Georgiana Gligor
    ✤ Geek. Mother. Do-er.
    ✤ Crafting LAMP enterprise apps
    ✤ Large-Scale Application Architect
    ✤ PHP Cluj Meetup Organiser
    ✤ Systems Engineering PhD Student
    @gbtekkie
    [email protected]

    View Slide

  3. ‹#›

    View Slide

  4. ‹#›

    View Slide

  5. 5
    magic bullet
    solving conflicts
    build a one-size-fits-all recipe
    daily usage of git commands
    WE ARE NOT TALKING ABOUT

    View Slide

  6. 6

    View Slide

  7. 7
    where to look when you need help
    highlight costs
    framework to make informed decisions
    WE WILL AIM FOR

    View Slide

  8. VERSION CONTROL
    SYSTEMS

    View Slide

  9. 9
    2015 Stack Overflow Developer Survey
    PRESENT
    Git
    SVN
    TFS
    Mercurial
    CVS
    Perforce
    Other
    I don’t use source control 9.3%
    5.8%
    3.3%
    4.2%
    7.9%
    12.2%
    36.9%
    69.3%

    View Slide

  10. 10
    NO VCS

    View Slide

  11. 11
    NON-DISTRIBUTED VCS

    View Slide

  12. 12
    It's not like git got
    everything right, but it
    got all the really basic
    issues right in a way
    that no other SCM had
    ever done before.
    Linus Torvalds, 2014
    linux.com 2015 interview

    View Slide

  13. 13
    strategies
    stakeholders questions
    concepts
    AGENDA

    View Slide

  14. STAKEHOLDERS

    View Slide

  15. ‹#›
    imgur.com/gallery/yBa1OGm
    developer

    View Slide

  16. 16
    DEVELOPER

    View Slide

  17. ‹#›
    https://flic.kr/p/oz7DzV
    tester

    View Slide

  18. 18
    TESTER

    View Slide

  19. ‹#›
    https://flic.kr/p/cA85MY
    package builder

    View Slide

  20. 20
    Photo Credits:
    https://flic.kr/p/39LRXP
    https://flic.kr/p/hRKQ2h
    PACKAGE BUILDER

    View Slide

  21. ‹#›
    https://flic.kr/p/sDZaia
    deployer

    View Slide

  22. 22
    DEPLOYER

    View Slide

  23. ‹#›
    s
    integrator
    https://flic.kr/p/D2t2t

    View Slide

  24. 24
    INTEGRATOR

    View Slide

  25. ‹#›
    BUG HUNTER
    https://flic.kr/p/owugoL
    bug hunter

    View Slide

  26. 26
    BUG HUNTER

    View Slide

  27. ‹#›
    https://flic.kr/p/pxJ3o5
    project manager

    View Slide

  28. 28
    PROJECT MANAGER

    View Slide

  29. 29
    PROJECT MANAGER

    View Slide

  30. 30
    PROJECT MANAGER

    View Slide

  31. CONCEPTS

    View Slide

  32. 32
    MASTER

    View Slide

  33. 33
    PUBLIC VS LOCAL

    View Slide

  34. 34
    LONG-LIVED VS EPHEMERAL
    https://github.com/php/php-src

    View Slide

  35. 35
    LONG-LIVED VS EPHEMERAL
    https://github.com/php/p

    View Slide

  36. 36
    TOPIC BRANCH

    View Slide

  37. 37
    MERGE WORKFLOW

    View Slide

  38. 38
    MERGE WORKFLOW

    View Slide

  39. 39
    REBASE WORKFLOW

    View Slide

  40. 40
    aka Trunk-Based Development
    STABLE TRUNK

    View Slide

  41. 41
    UNSTABLE TRUNK

    View Slide

  42. 42
    INTEGRATION PIPELINE

    View Slide

  43. STRATEGIES

    View Slide

  44. 44
    LONE WOLF

    View Slide

  45. 45
    GIT FLOW

    View Slide

  46. 46
    GITHUB FLOW

    View Slide

  47. 47
    SIMPLE GIT WORKFLOW

    View Slide

  48. 48
    WORKFLOW FOR AGILE TEAMS

    View Slide

  49. 49
    GITLAB FLOW

    View Slide

  50. 50
    GITWORKFLOWS

    View Slide

  51. 51
    Men have become the
    tools of their tools.
    HENRY DAVID THOREAU

    View Slide

  52. 52
    ✤ is anyone waisting time?
    ✤ polyglot technology stack
    ✤ geographically distributed team
    ✤ production bugs pile up
    ✤ team restructuring
    TRANSITION?

    View Slide

  53. QUESTIONS?
    }
    Affordable quality system architecture.
    In-house polyglot trainings.
    @gbtekkie
    https:/
    /joind.in/talk/0f19e

    View Slide

  54. 54
    RECOMMENDED READING
    ✤Guide to Enterprise PHP Development
    ✤A Rebase-based workflow
    ✤Git team workflows: merge or rebase?
    ✤Understanding the Git Workflow
    ✤Linus on clean history
    ✤gitworkflows
    ✤GitHub Flow
    ✤Atlassian Simple Git Workflow
    ✤GitLab Flow
    ✤Git Flow
    ✤Atlassian series on Git
    ✤Trunk-based Development

    View Slide