Skip to content

Gitflow, with merge commits into main

Work merges into develop, and main moves only when a release or hotfix branch merges into it, so main, and the docs site published from its tags, are always the latest release. Changes squash into develop, which keeps its history one commit per change, but anything that goes into main, and main back into develop, is a merge commit: a squash would give main commits that develop never has, and each later release would conflict with them. That is why main has no linear-history rule while the rest of the history mostly looks linear. Workflows tag a release when it merges into main and merge main back into develop, so neither step depends on someone remembering it (releasing). They only tag: publishing the package and the docs site runs on the tag, so the branching workflows know nothing about how a project is released, and are shared with other projects in zmnatz/github-workflows.

Considered Options

  • One branch, a release is a tag on it (until 0.4.0): simplest, but unreleased changes reached the docs site and main before they shipped.
  • develop without release branches: a release would be a pull request from develop to main, but it gives no place to finish a release while other changes keep merging.