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

Trunk Based Development

Trunk Based Development

Jiří Chára

December 15, 2014
Tweet

Other Decks in Programming

Transcript

  1. ?!

  2. ..time for TBD Trunk Based Development (TBD) is where all

    developers (for a particular deployable unit) commit to one shared branch under source-control. That branch is going to be colloquially known as trunk.
  3. • Branches are only made for a release • Developers

    are not allowed to create branches in shared place • Only release engineers commit to release branches • Cherry-pick is allowed • Old release branches should be deleted
  4. • Don't break the build! • Double-check functional change! •

    NEVER --force push to trunk! • Do nice commit messages! • Revert commit when you push something BAD! • Use pre-commit verifications! • Let CI be your friend!
  5. Branch by Abstraction (BbA) a pattern for making large-scale changes

    to your application incrementally on mainline
  6. How to do BbA? 1) Create an abstraction over the

    part of the system that you need to change. 2) Re-factor the rest of the system to use the abstraction layer 3) Create new classes in your new implementation, and have your abstraction layer delegate to the old or the new classes as required. 4) Remove the old implementation 5) Rinse and repeat the previous two steps, shipping your system in the meantime if desired 6) Once the old implementation has been completely replaced, you can remove the abstraction layer if you like