Branching & merging strategies (Git Based) in DevOps

 

Branching Mechanism 

  • git flow : - (see at)
  • truck based:- Trunk-based development promotes for a single primary branch known as the trunk, thereby eliminating any long living branch in the prior plan (Git Flow). 
    • Git flow involves no of branches. Each branch possesses its distinct variation. It possesses its own accountability. 
    • Trunk-based development is a version control management approach in which developers combine modest, frequent changes. modifications to the primary branch of the main branch.
    • Here you will maintain a single primary branch that keeping your production code and the golden copy. 
      • The developer will  create a feature branch anytime they intend to develop a new feature. This is a transient (short lived branch) branch. 
      • That indicates that immediately upon completion of your feature, and when you and when you create a PR over there; the option to delete the branch was there. You may utilize that option here.
      • As soon as you are complete with your user story, your product, your development, your feature branch will be deleted.

 

truck based PROS

  • It's very small, straightforward, not multiple branches over here.
  • So easy to understand.

 

truck based CONS

  • needs an expert team to slice features properly because you're removing Branches. So you need an experienced crew to know what they're doing.
  • Since you have only one primary branch, good CI CD practice is essential. Stable CI CD pipeline practice is essential.

 

 


Related Question