Git flow

This document describes the source management process used by the Openstad project. We use, as many other projects, a process called Git Flow, this document emphasizes interfacing with external developers/teams instead of reiterating Git Flow documentation readily available on the Web.

Overview

git flow overview

Read Atlassian's awesome [Git Flow documentation](https://www.atlassian.com/git/tutorials/comparing- workflows/gitflow-workflow) for more information.

Branches & Repos

master

  • The latest stable release.

  • Tagged according to 's versioning scheme.

  • Commits merged from hotfix and release branches.

  • Once released add date and version number to changelog

development

  • The work-in-progress next release.

  • Commits merged from pull requests.

feature/my-awesome-feature

  • Development for a new feature

  • These should be used in forks, not the official repositories

  • Once the feature is completed the branch will be merged into development

  • For every feature merged add to explanation to changelog

release/x.y.z

  • A release branch is opened as a code freeze some time before the next release based on the current develop-branch.

  • Release branch should only include bugfixes to the features that will be in the next release.

  • Any new features should be merged to develop-branch for a release after the next one.

  • Once the release testing has been completed the branch will be merged into develop and master.

hotfix/x.y.z

  • When urgent bugfixes are required for the latest release a hotfix-branch is opened based on the current master-branch

  • Once the fixes are completed the branch will be merged into develop and master

  • For every hot fix merged add to explanation to changelog

External branches

The branching model utilized by an external team is generally irrelevant to the process of handling external contributions. It is, however, assumed for the purposes of this document that there exists a continuous sequence of commits from the latest merge from branches on GitHub to the commit(s) presented for consideration for inclusion in proper. This is required in order to be able to rebase such commits on the develop branch.

Code acquired from external sources will be subject to adaptation (if deemed necessary), normal feature testing and bugfixes before it can be merged into the development branch.

Creating releases

For creating a branch for version x.y.z

Merging pull requests to release

Merging changes back to master

Merging changes back to develop

Cleanup

Versioning the code

  • Releases should move the minor version 1.50.0 -> 1.51.0

  • Hotfixes should move the patch version so 1.50.0 -> 1.50.1

    Checkout to branch that should have the version updated

    git checkout {branch}

    Commit the changes to Git

    git add . git commit -m 'Bump version' git push

Develop branch version should always be the next version + "-SNAPSHOT". For an example if the version in master is "1.50.0", develop should be "1.51.0-SNAPSHOT".

Creating hotfixes

Much like creating releases except hotfixes are based on the master version (releases are based on develop).

For creating a branch for version x.y.z

Merging pull requests to hotfix

Merging changes back to master

Merging changes back to develop

Cleanup

Credits

Most of this document has been taken from: https://oskari.org/documentation

Last updated