The majority of teams using git have a work flow that looks similar to the four well known work flows:
Git Development - the Shaken Fist Way
The Shaken Fist developers have chosen Trunk Based Development.
- This branch should be a working version of the project that has passed all unit and integration tests.
- The code is reasonably reliable but still has the reliability of software with a v0.x semver tag.
- Code on the
developbranch that has passed all CI pipelines can be merged to
- This is the development trunk.
featurebranches are branched from
developand merged to
developbranch is merged to
masterwhen significant development milestones have been adequately tested.
- Short-lived, generally a few days.
- Normally only one developer.
- When presented to the team, it is expected to pass the linter and unit tests.
- It is normal that other team members suggest changes/improvements before merging.
- Only created when a release requires patches (hot-fixes).
- Commits to this branch are cherry-picks from
- It is not expected that many commits are made to this branch.
- If many commits are required to a release branch then this indicates the need for another release.
- Feature/Bug branches have a prefix consisting of the GitHub issue number - no need for the word bug or issue.
- The feature branch developer should squash commits to remove WIP commits before creating a Pull Request.
- It is preferably that each remaining commit passes testing/CI.
- Commits are not squashed when merged to
- Not squashing commits maintains history of multiple issues being solved.
- Pull Request related commits remain grouped and can be understood as a single merge
- Only necessary bug fixes are cherry-picked from
masterto an existing
Too many cherry-picked commits to a Release branch
If a large number of commits appear desirable on a
release branch, it is probably an indication that another minor release would be a better idea.
If another release is not desired because
master contains unstable features then either CI needs improving or that feature requires more work and should not be in