Why need a strategy? What is it?
Stable/Integration branch: (“prod”, “master_prod”)
Release branch: (“release”, “pre-prod”)
Feature branch: (“dev”, “uat”)
Unstable/Hotfix branches: (“hotfix”, “quickfix”, “bugfix”, “QA”)
After every branch (feature, hotfix, quickfix) branches are merged to the main branches, tag the latest commit for future reference and delete the branch.
Follow the steps below:
Steps to develop the below git strategies or git branching strategy:
NOTE: There is no fixed defined strategy; adapt the strategy based on your project and business needs.
Clone the project:
git clone http://github.com/divyabhushan/structuralStrategy.git structuralStrategy
“master-prod”: Accepts merges/code/commits only from the “prod” branch
“prod”: Perform only a merge --squash from “release” branch.
Merge only when approved by “QA”
Tag every merge in the format: v1.0, v1.1 … v1.*
“release”: merge from the branches “dev”, “uat”, “QA”.
Every release commit/project code version has to be approved by “QA”.
Tag every merge in the format: r1.0, r1.1 … r1.*
“dev” and “uat” never merge with each other.
“hotfix” branch commits are shared among any feature branches such as “dev” and “uat”
“feature” branch is private to “dev” alone and is dropped after merging.
Diagram: Structural Strategy
cd structuralStrategy [Divya1@Divya:structuralStrategy [master_prod] $gitk --all
To continue developing your project:
Firstly thanks for providing this tutorial from this article I have gathered lots of information. I can say that whatever the information provided by knowledgeHut is more useful to know more about the git.