Branching

Skip navigation

Branching

/ March 19, 2012

The version control feature introduced in version 3 improves the way you can collaborate with others on a project. You commit functionality once it is done, retrieve changes from others, look at the history to see what has happened and so on.

Once you are comfortable with the basic version control scenarios you might want to take at a more advanced feature: branching. Branch lines allow you to have two (or more) independent development lines of your project.

There are two common scenarios for creating branch lines: feature branches and maintenance branches. You create a feature branch if you want to develop a large (e.g. more than a week) feature independently. Once the whole feature is done you merge the feature branch back into the main line. By doing this in a branch line, team mates developing the main line are not confronted with an incomplete feature when they update.

A maintenance branch is used to fix small problems in the currently online version of your Mendix application. If a bug is reported you want to fix it in exactly the version it occurred in and put the result online again. The main line probably has new features that you do not want to deploy yet. So you create a branch line that represents the version you put online. The Modeler makes this easy by tagging all releases that you upload to the cloud or create a deployment archive for.

Create a branch of the tagged version, fix the bug and deploy the application. Do not forget to merge the fixes you do in a maintenance branch back to the main line! It is recommended to do this as quickly as possible so that you still know what was changed.

If you want to know more about branching, you can check out the relevant sections of the version control scenarios documentation page.