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.

84cfe0e14cd3fdf8d1b2ef8223d99619?s=128

Georgiana Gligor

May 12, 2017
Tweet

Transcript

  1. ‹#› CHOOSE WISELY TO MINIMISE COSTS BRANCHING STRATEGIES Georgiana Gligor

    / @gbtekkie phpDay 2017
  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 gb@tekkie.ro
  3. ‹#›

  4. ‹#›

  5. 5 magic bullet solving conflicts build a one-size-fits-all recipe daily

    usage of git commands WE ARE NOT TALKING ABOUT
  6. 6

  7. 7 where to look when you need help highlight costs

    framework to make informed decisions WE WILL AIM FOR
  8. VERSION CONTROL SYSTEMS

  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%
  10. 10 NO VCS

  11. 11 NON-DISTRIBUTED VCS

  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
  13. 13 strategies stakeholders questions concepts AGENDA

  14. STAKEHOLDERS

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

  16. 16 DEVELOPER

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

  18. 18 TESTER

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

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

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

  22. 22 DEPLOYER

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

  24. 24 INTEGRATOR

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

  26. 26 BUG HUNTER

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

  28. 28 PROJECT MANAGER

  29. 29 PROJECT MANAGER

  30. 30 PROJECT MANAGER

  31. CONCEPTS

  32. 32 MASTER

  33. 33 PUBLIC VS LOCAL

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

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

  36. 36 TOPIC BRANCH

  37. 37 MERGE WORKFLOW

  38. 38 MERGE WORKFLOW

  39. 39 REBASE WORKFLOW

  40. 40 aka Trunk-Based Development STABLE TRUNK

  41. 41 UNSTABLE TRUNK

  42. 42 INTEGRATION PIPELINE

  43. STRATEGIES

  44. 44 LONE WOLF

  45. 45 GIT FLOW

  46. 46 GITHUB FLOW

  47. 47 SIMPLE GIT WORKFLOW

  48. 48 WORKFLOW FOR AGILE TEAMS

  49. 49 GITLAB FLOW

  50. 50 GITWORKFLOWS

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

    DAVID THOREAU
  52. 52 ✤ is anyone waisting time? ✤ polyglot technology stack

    ✤ geographically distributed team ✤ production bugs pile up ✤ team restructuring TRANSITION?
  53. QUESTIONS? } Affordable quality system architecture. In-house polyglot trainings. @gbtekkie

    https:/ /joind.in/talk/0f19e
  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