Skip to main content

Git flow

In DECODE we mostly use Sourcetree, but feel free to use git from terminal, your source editor or any other (e.g. Fork) if that best suits your needs.

tip

Whichever client you use, please disable automatic push on commit, as that sooner or later results in unwanted pushes to a branch you did not mean to 😅

Tooling aside, git flow we're using consists of a few general requirements:

  • main or master branch is in most cases used for stable code and releases
  • in more complex use-cases and if needed, versioned release branches can be created as well
  • development or dev branches are used for active development
  • features should be developed in branches prefixed with feature/ followed by ticket tracking number and description, branched out from development branch
  • bugfix branches are equivalent to feature in naming, but start with bugfix/ prefix, branched out from development branch
  • for long-lasting feature development (lasting a longer time in general or multiple sprints) it is recommended to extract a feature-dev branch from development and branch out smaller development tasks from it and merge back to it. This way we don't have half-baked features in development branch, possibly non-building. In this case, make sure to merge development branch to feature development branch regularly not to diverge too much
  • hotfix branches are created from main (or version release branch), merged back to main and cherry-picked (or main merged) to development branch
  • tc and rc branches are created to test and release candidates from development branch. Once rc is accepted, it is merged to main
  • final releases and test candidates should be tagged si it's easier to determine exact commit to fix bugs on (or if they have been obsoleted). Tags should be prefixed with test or release, e.g. release-v2.0.2
  • all code changes should ideally be done via a Merge Request and reviewed