IRNAS / irnas-guidelines-docs

This repository contains guidelines related to various aspects of managing GitHub repositories at IRNAS and working with them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change branching model from Gitflow to Trunk Based Development

MarkoSagadin opened this issue · comments

Context

We have been using our version of GitFlow for about a year now. The way we have set it up from the beginning (small feature branches) and how our collaboration progressed during one year (Stacked changes with Graphite) it makes sense to switch to the trunk-based development branching model.

Trunk-based development

Trunk-based Development (TBD) can be succinctly described with below statement:

Trunk-based development is a version control management practice where developers merge small, frequent updates to a core “trunk” or main branch. Since it streamlines merging and integration phases, it helps achieve CI/CD and increases software delivery and organizational performance.

In a nutshell, there is only one main branch to which developers can either commit directly or from small feature branches through PRs.

Rationale for switch

  • We are already making our feature branches to be as small as possible, as dictated by TBD.
  • We are actively working towards daily integrations to the dev branch, as dictated by TBD.
  • We are mostly already splitting our work into multiple smaller reviewable units (branches/PRs)
  • We want to simplify CI release process, by removing Gitflow functionalities that to do not provide any value.
  • In the 1 year of GitFlow usage we had no need of a master branch from the point of dev branch isolation.
  • Hotfix branches were mostly not used.
  • There is a planned development effort to upgrade our existing CI infrastructure.
  • Expected disruption to a developer workflow is expected to be minimal. We are already mostly working in a style of TBD, although some chores will be needed related to the CI workflow files.

Implementation steps

This is an Epic issue which will track required changes that need to happen over several repos.

Definition of Done

Above implementation steps are completed and reviewed.

Extra

More about trunk-based development can be found here: https://www.atlassian.com/continuous-delivery/continuous-integration/trunk-based-development

Closing this as the transition was done.