Choose the right platform and best branching strategy in an unbiased way.
With Git platforms offered on the cloud, it is now easier than ever to create code repositories on a platform that you prefer.
Most popular platforms like Bitbucket, GitLab, GitHub, and Azure DevOps offer a free tier suitable to host open-source projects. Enterprise tiers are available for dedicated space for controlling employee and vendor access or advanced automation and reporting.
There are several popular branching strategies that you can adopt, two of the most popular being git-flow (a.k.a. long-lived feature branches) and trunk-based development.
Below, we compare git-flow vs. trunk-based noting key considerations for each.
Philosophy
Git-flow | Trunk-based |
---|
As far as possible from main branch | As close as possible to main branch |
New features started from develop branch | Short-lived feature branches started from main branch |
New release branch derived from develop branch, after stabilized release branch deployed | Main branch always in a state ready to be deployed to production |
Only hotfixes derived from main branch | Hotfixes start from main or release branch, need to be cherry-picked back to main |
Team composition
Git-flow | Trunk-based |
---|
Lack of seniority within the team | Well-composed and experienced team |
Working with other vendors/third-party | Team augmentation model |
Product type
Git-flow | Trunk-based |
---|
Complex, mature, monolithic product | Microservices |
Brown-field product | Modern single page application (SPA) / Mobile apps |
| Proof-of-concept (POC) / Prototype |
| Distributed system components |
Authoring process
Git-flow | Trunk-based |
---|
Governed | Team-driven |
Deployment
Git-flow | Trunk-based |
---|
Various deployment models used | Continuous Deployment practices recommended, such as feature toggles, quality gates, canary testing, self-service automation (e.g.. ChatOps), and monitoring |
Release frequency
Git-flow | Trunk-based |
---|
Slower release cadence, pre-determined schedule | Teams able to iterate quickly and independently |