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
ormaster
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
ordev
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 mergedevelopment
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 branchtc
andrc
branches are created to test and release candidates fromdevelopment
branch. Once rc is accepted, it is merged tomain
- 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
orrelease
, e.g. release-v2.0.2 - all code changes should ideally be done via a Merge Request and reviewed