From 51681ade00296245bdeb1bdf65fcbb0a1f2bb76d Mon Sep 17 00:00:00 2001 From: NoomSennalabs Date: Tue, 25 Jul 2023 15:35:43 +0700 Subject: [PATCH] feat(branch-management): add branch management readme.md --- .../version control/2.branch-managment.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Developer/development/version control/2.branch-managment.md b/Developer/development/version control/2.branch-managment.md index e69de29..5536416 100644 --- a/Developer/development/version control/2.branch-managment.md +++ b/Developer/development/version control/2.branch-managment.md @@ -0,0 +1,55 @@ +# Branch Management + +Adhering to best practices for branch management is crucial to ensure a smooth development process. Following proper conventions can help maintain an organized codebase, reduce merge conflicts, and streamline collaboration between team members. + +## Branch Strategy ## + +The main idea behind the Git flow branching strategy is to isolate your work into different types of branches. There are five different branch types in total: +- Main +- Develop +- Feature +- Release +- Hotfix + +The two primary branches in Git Flow are main and develop. There are three types of supporting branches with different intended purposes: feature, release, and hotfix. + +## Protected Branch ## + +To prevent accidental deletion or unwanted changes to primary branches like main or develop, you can implement branch protection policies on your remote repository. provide options to configure branch protection rules. + +- Requiring pull requests and code reviews before merging changes +- Enforcing status checks (e.g., passing tests or successful builds) before a merge is allowed +- Restricting direct pushes to the protected branch +- Disallowing force pushes and branch deletions + +## **The branch formatting should be structured as follows** + +``` +/ +``` + +## **Type** + +| Type | Description | +| -------- | ----------------------------------------------------- | +| feature | new feature | +| hotfix | fix bug | +| release | versions of production code have been deployed | + +## **Scope** + +Scope is the main purpose of telling what to do with this branch. it is a broad description to give a picture of what needs to do with this branch. + +## **Example** + +``` +feat/product-management +``` + +``` +hotfix/user-profile +``` + +``` +release/v1.0.1 +```