Embedded Firmware Git Workflow
Embedded Firmware Git Workflow
The following has been used successfully on several one and two person projects spanning 3 to
9 months.
Overview
Git allows many different workflows. We will use the following Feature Branch Workflow.
1. Use feature branches for all new features and bug fixes
2. Merge feature branches into the master branch once the work is done*
3. Keep a high quality, up-to-date master branch - always builds, passes tests, safe to
branch from
4. Use release branches for all releases
*Done - defined per project but likely includes - passes all tests, code review complete.
Tip: Bitbucket Server can be configured per repo to prevent commits into master and restrict
merge to Pull Requests. This approach is not required.
Tips: Branches created within Bitbucket Server have the appropriate prefix.
Use release branches for all software releases
Create a release branch from the master branch when you believe you are ready to stabilise
code for release. Create branches to fix bugs from the release branch. and merge them back
into the release branch. When a release is complete, merge the release back into master. Any
hotfixes should be branched from the release branch.
Tip: Lock release branches when you're ready to stop supporting a particular release.
Tagging Releases
Tag commits which are release candidates and tag the actual releases.
E.g. on release branch release/20 which failed testing on rc1 but passed on rc2, the following
tags should be in place: v20-rc1, v20-rc2, v20 (v20 = v20-rc2)
Tip: A pull request can be raised many times in the development of a branch. It can act simply
as the basis of a discussion.