Master — Develop Git branching explained

https://razvan-gaston.medium.com/master-develop-git-branching-explained-cd7375046837

https://nvie.com/posts/a-successful-git-branching-model/

I wanted a very simple explanation to why we have a Develop Git Branch.
In my previous project we only had the Master branch.

Let’s say that we build a tree..

  • we have the Master Branch, which is the released product into production.
  • then we have the Develop Branch, which contains all the work for the next release. We need a separate branch, because we don’t want to commit current development directly to Master, because it can be that
    – it is work that needs to go into Master together as a package, work from several people
    – or what has been developed it has to bee properly tested/signed-off before committing it to Master
  • we keep the Master branch for Hot Fixes only.

How do you release a new version?

https://stackoverflow.com/a/20755706/1864614

  • Once develop has acquired enough features for a release
  • you fork a release branch off of develop, so no new features can be added after this point.
  • Once it’s ready to ship, to release =
    • 1. merge the release Branch into master , and tag it with a version number. Call the merge commit release 1.14
      • At this point Master = Develop, at version 1.14, E.G at the given Tag
      • (if required, merge also Master into Develop.) this shouldn’t be needed
    • 2. deploy Master

L.E 06.2024

  • Master Tracks what is already released (deployed to Prod)
  • Develop – Tracks the next release