GitFlow for Labs

 

Cognitive Lab will be experimenting with the following GitFlow workflow:

In this workflow we will have four types of branches: 

  1. A Master (Release branch). Merges into that branch require code tagging and tag version incrementation. Note that a merge from the develop branch may increment either the major or minor version. A merge from the hotfix branch will increment the hotfix version.
  2. Hotfix Branches. These branches are to perform hotfixes on existing releases. After a merge back into the release branch, you must retag the code and increment the hotfix version number by one. You may optionally fetch and merge release branch changes into the Develop Branch to carry over the hotfix as necessary.
  3. Development Branch. This is the main branch we will be operating from. When new features are to be added to the next release, the latest release branch changes are merged into the Develop Branch. Iteration work is done from branches off the Development Branch.
  4. Feature Branch: All iterations will be done as 'Feature/Topic' branches. In this case, the code will be branched off the Dev Branch, enhanced, and then merged back into the Dev Branch. Note that at times, we may implement pull requests to ensure that a code review has been performed before merging back into the Dev Branch.

Hygiene:

  1. Feature Branch: Code must compile before checking into the Feature/Topic Branch. Ideally, it should pass all tests. Nightly builds should run off these branches.
  2. Dev Branch: Code must compile and pass all tests before being merged into the Dev Branch. Generally, code will be reviewed by Pull Requests before being approved for merges. After each sprint, code should be merged back into the Dev Branch.
  3. Release Branch: When code is merged into the Release Branch, it has been tested, vetted, reviewed, and approved for merging. The code is tagged and the proper tag version is assigned using the convention of major.minor.hotfixver.
  4. Hotfix Branch: Short hotfixes should be done on this branch and merged back into the release branch and optionally into the Dev Branch.