Workflow

In Octopus the development and releases are done using Oneflow. This workflow is described here

In Oneflow there is one eternal branches, main . There are also three types of short-lived branches called supporting branches. These are the feature, release and hotfix branches. For a detailed explanation of the purpose of each type of branch and of the workflow used to create and merge the short-lived branches, please read the Gitflow description from the above link carefully. Nevertheless, there are some points that need to be stressed, while some special cases need to be explained more in detail.

What main branch should be used to create the supporting branches

One common mistake when using Gitflow is to create a support branch from the wrong main branch, so here is a quick recap:

What to do when finding a bug

If you are working on the main branch or a feature branch, the first thing to do is check if the bug is also present in last release. This will be the most likely situation unless you are working on some feature that was only recently added.

Possible issues and special cases

Bug fixes that have significantly diverged between a release and main

What if there is a bug that is present both in a release and main , but the code where the bug is found has significantly diverged between the two branches? If the code in the release and main have diverged to a point where they require two completely different sets of changes to fix the bug, treat this as two different bugs, one only exists in the release, and one that only exists in main . Nevertheless, git is surprisingly good at applying the same patch to two different branches if the differences between the two branches are not too complex. So, before deciding to treat a case like this as two different bugs, you might want to try first to commit the fix to an hotfix branch created from the release tag, and then locally merging it into main (make sure you know how to remove a commit by resetting the HEAD of a branch in git before attempting this).

Incorporating fixes into main before the hotfix branch is finished

In the way Oneflow was originally designed, hotfix branches are supposed to only exist for a very short period of time. For a code like Octopus, which is usually not a critical component of the users' system, we might want to accumulate a few bug fixes in the hotfix branch before doing a release. This is to avoid too frequent releases, and the associated work load.

So what happens if one wants to include some fix from the hotfix branch into main before the hotfix branch is finished? As it happens, one can merge the hotfix branch into main at any time, and as often as necessary, so this is not really an issue. One simply needs to create merge requests to merge the hotfix branch into main as necessary.