In this article we will see how to decide which Git Workflow is the best for your project!
You can also visit Git Workflow | Atlassian to know more about popular git workflows.
I feel practically implementing Git Workflow is always a modified version of common workflows like Centralized Workflow, Feature Branch Workflow, Trunk-Based Workflow....etc.
Let us see the important parameters that are crucial while designing a Git Workflow for your project.
Team Size- "too many cooks spoil the broth!"
The code maintenance and management becomes challenging and is directly dependent upon the number of developers working on a project. For instance, if the team size is just 2-3 developers or working alone, a centralized workflow can be a suitable option. Tasks like code reviews, branch policies setup, code quality check and so on are not applied in this approach. However when you need to manage large teams, it is necessary to create multiple branches.Developer's Forte "Less efficiency more work!"
It is important to understand the overall efficiency of the team. I would put it this way...
More Junior Developers----> Complex Version Control
In this scenario, senior developers closely monitor the work done by juniors. Stricter control is required before merging the code to the master or release branch.
More Senior Developers----> Simple Version Control
Expert developers can just maintain a single branch iterating quickly as the requirement comes up. This is nothing but Trunk-Based Development or Trunk Based Workflow where you maintain just master and release branches.Proof of Concept(POC) or Established Product-"Start easy finish strong!"
In very initial stages or while working on POCs creating multiple branches like dev, feature, release, etc is completely redundant.
In this phase generally the customer frequently requests for a fundamental change in the requirement. Start with a simple workflow and as the product grows improve your design. Just make sure you have an efficient collaboration.
In case of an established product it is better to maintain some long-lived branches like dev, release, feature for efficacious management following workflows like Gitflow Workflow. You can definitely modify it as per the requirement.
Note: Long lived branches have a higher risk of merge conflicts, best to keep your features small.
I have just discussed the most important ones.....there are many more!
Trunk- Based Workflow is considered as the DevOps best practice and also very popular today!
But what is popular is not always the best option! All the best! Keep on enhancing your workflow with time!
Top comments (0)