Gitflow - Git branching strategy

1/4/2020

A good branching strategy is necessary for CI/CD. This works for me, let me know if you disagree on any of this.

 

A successful Git branching model:

Master Branch:

  • origin/master to be the main branch where the source code of HEAD always reflects a production-ready state.
  • All of the changes should be merged back into master somehow and then tagged with a release number.

Develop Branch:

  • origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release.

Gitflow Supporting Branches:

  • Feature
  • Release
  • Hotfix

Feature branches:

  • Must branch off from: develop
  • Must merge back into: develop
  • Branch naming convention: anything I prefer “JobNumber-JobTitle/#JIRATicketNumber”?

Release branches:

  • Must branch off from: develop
  • Must merge back into: develop + Master
  • Branch naming convention: anything I prefer “Release-*(ReleaseNumber)”.

HotFixes Branches:

  • Must branch off from : master
  • Must merge back into: develop + Master
  • Branch naming convention: I prefer “hotfix-*(#JIRATicketNumber)”

Summary:

Here is the Google slide link that I have created if anyone interested.

https://docs.google.com/presentation/d/18t1VhjoWoLx73GopDpEjvJ0kBPwMzZXrL2-kzJyjj_0/edit?usp=sharing:

Please let me know if you have any questions.