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:
mainormasterbranch 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
developmentordevbranches 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
developmentand 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 mergedevelopmentbranch to feature development branch regularly not to diverge too much hotfixbranches are created from main (or version release branch), merged back to main and cherry-picked (or main merged) to development branchtcandrcbranches are created to test and release candidates fromdevelopmentbranch. 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
testorrelease, e.g. release-v2.0.2 - all code changes should ideally be done via a Merge Request and reviewed