Choosing the Right GitWorkflow: A Comparative Analysis of Trunk-based vs. Branch-based Approaches

  • Pedro Lopes UFPE
  • Paola Accioly UFPE
  • Paulo Borba UFPE
  • Vitor Menezes UFPE

Abstract


Git has become one of the most widely used version control systems today. Among its distinguishing features, its ability to easily and quickly create branches stands out, allowing teams to customize their workflows. In this context, various formats of collaborative development workflows using Git have emerged and gained popularity among software engineers. We can categorize such workflows into two main types: branch-based workflows and trunk-based workflows. Branch-based workflows typically define a set of remote branches with well-defined objectives, such as feature branches, a branch for feature integration, and a main branch. The goal is to migrate changes from the most isolated branch to the main one shared by all as the code matures. In this category, GitFlow stands out as the most popular example. In contrast, trunkbased workflows have a single remote branch where developers integrate their changes directly. In this range of options, choosing a workflow that maximizes team productivity while promoting software quality becomes a non-trivial task. Despite discussions on forums, social networks, and blogs, few scientific articles have explored this topic. In this work, we provide evidence on how Brazilian developers work with Git workflows and what factors favor or hinder the use of each model. To this end, we conducted semistructured interviews and a survey with software developers. Our results indicate that trunk-based development favors fast-paced projects with experienced and smaller teams, while branch-based development suits less experienced and larger teams better, despite posing management challenges.

Keywords: Git Workflow, Branch-based, Trunk-based, GitFlow

References

Sebastian Baltes and Stephan Diehl. 2016. Worse Than Spam: Issues In Sampling Software Developers. In Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (Ciudad Real, Spain) (ESEM ’16). Association for Computing Machinery, New York, NY, USA, Article 52, 6 pages. DOI: 10.1145/2961111.2962628

Christian Bird and Thomas Zimmermann. 2012. Assessing the Value of Branches with What-If Analysis. In Assessing the Value of Branches with What-If Analysis (Cary, North Carolina) (FSE ’12). Association for Computing Machinery, New York, NY, USA, Article 45, 11 pages. DOI: 10.1145/2393596.2393648

Julio César CORTÉS RÍOS, Suzanne M. Embury, and Sukru Eraslan. 2022. A unifying framework for the systematic analysis of Git workflows. Information and Software Technology 145 (2022), 106811. DOI: 10.1016/j.infsof.2021.106811

Catarina Costa, José Menezes, Bruno Trindade, and Rodrigo Santos. 2021. Factors That Affect Merge Conflicts: A Software Developers’ Perspective. In Proceedings of the XXXV Brazilian Symposium on Software Engineering (Joinville, Brazil) (SBES ’21). Association for Computing Machinery, New York, NY, USA, 233–242. DOI: 10.1145/3474624.3474641

Toon DE BOER. 2021. From Trunk-Based to Merge Requests: A Field Study at Adyen. Master’s thesis. Delft University of Technology, Delft, Netherlands. [link]

Niels Jørgensen. 2001. Putting it all in the trunk: incremental software development in the FreeBSD open source project. Information Systems Journal 11, 4 (2001), 321–336. DOI: 10.1046/j.1365-2575.2001.00113.x arXiv: [link]

Pedro Lopes, Paola Accioly, Paulo Borba, and Vitor Menezes. 2025. Choosing the Right Git Workflow: A Comparative Analysis of Trunk-based vs. Branch-based Approaches. Zenodo. DOI: 10.5281/zenodo.17054411

Steve Neely and Steve Stolt. 2013. Continuous Delivery? Easy! Just Change Everything (Well, Maybe It Is Not That Easy). In Proceedings of the 2013 Agile Conference (AGILE ’13). IEEE Computer Society, USA, 121–128. DOI: 10.1109/AGILE.2013.17

Stephen Phillips. 2020. Working through the pandemic: Accelerating the transition to remote working. Business Information Review 37, 3 (2020), 129–134. DOI: 10.1177/0266382120953087 arXiv: DOI: 10.1177/0266382120953087

Shaun Phillips, Jonathan Sillito, and Rob Walker. 2011. Branching and merging: an investigation into current version control practices. In Proceedings of the 4th InternationalWorkshop on Cooperative and Human Aspects of Software Engineering (Waikiki, Honolulu, HI, USA) (CHASE ’11). Association for Computing Machinery, New York, NY, USA, 9–15. DOI: 10.1145/1984642.1984645

Rayene Ben Rayana, Sylvain Killian, Nicolas Trangez, and Arnaud Calmettes. 2016. GitWaterFlow: a successful branching model and tooling, for achieving continuous delivery with multiple version branches. In Proceedings of the 4th International Workshop on Release Engineering (Seattle, WA, USA) (RELENG 2016). Association for Computing Machinery, New York, NY, USA, 17–20. DOI: 10.1145/2993274.2993277

J. Saldaña. 2009. The Coding Manual for Qualitative Researchers. Sage, USA. [link]

Emad Shihab, Christian Bird, and Thomas Zimmermann. 2012. The effect of branching strategies on software quality. In Proceedings of the ACM-IEEE International Symposium on Empirical Software Engineering and Measurement (Lund, Sweden) (ESEM ’12). Association for Computing Machinery, New York, NY, USA, 301–310. DOI: 10.1145/2372251.2372305

Bogdan Vasilescu. 2022. Methods L07 - Qualitative Analysis [CMU 17803 Empirical Methods - Fall 2022]. Carnegie Mellon University. [link]

Stefan Wagner, Daniel Mendez, Michael Felderer, Daniel Graziotin, and Marcos Kalinowski. 2020. Challenges in Survey Research. Springer International Publishing, Cham, 93–125. DOI: 10.1007/978-3-030-32489-6_4

Claes Wohlin, Per Runeson, Martin Höst, Magnus C. Ohlsson, Björn Regnell, and Anders Wesslén. 2012. Analysis and Interpretation. Springer Berlin Heidelberg, Berlin, Heidelberg, 123–151. DOI: 10.1007/978-3-642-29044-2_10

Thomas Zimmermann. 2016. Card-sorting: From text to themes. In Perspectives on Data Science for Software Engineering. Morgan Kaufmann, Boston, 137–141. DOI: 10.1016/B978-0-12-804206-9.00027-1
Published
2025-09-22
LOPES, Pedro; ACCIOLY, Paola; BORBA, Paulo; MENEZES, Vitor. Choosing the Right GitWorkflow: A Comparative Analysis of Trunk-based vs. Branch-based Approaches. In: BRAZILIAN SYMPOSIUM ON SOFTWARE ENGINEERING (SBES), 39. , 2025, Recife/PE. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2025 . p. 204-214. ISSN 2833-0633. DOI: https://doi.org/10.5753/sbes.2025.9903.