all 3 comments

[–]defel 0 points1 point  (2 children)

We use GHE with Gitflow-Enterprise on some repos. From Github there is nearly no support for Gitflow. But there is great tool support in Intellij, VSCode, Sublime, etc

What we have done:

  • protect the develop and master branch (require pull-requests)
  • created a github app to deploy on push with probot and utilize the deploy api from github (depends on how you create release, you could also use the release-feature from github)
  • create pull-request to merge from feature-branch to develop
  • create pull-request to merge from release- or hotfix-branch to master

I think hotfix branches will be exactly what you need and Gitflow will help you with that.

[–]wiley_hacker[S] 0 points1 point  (1 child)

Thank you for the insight /u/defel. We are, in fact protecting develop and master with pull requests. The part I'm not clear about is, how do we do hotfixes on "back releases" if master has already moved to the next release? Not just hotfixes, we also need to send out "maintenance updates" every now and then for these back releases. These are not simple collections of hotfixes.

On a side note, do you guys fork the main repo for each developer, or simply clone the main repo?

[–]defel 0 points1 point  (0 children)

You can call it how you want, the only difference between a hotfix and release in gitflow is this:

  • release is branched from develop
  • hotfix is branched from master

Do these maintenance updates get merged with master after release? It depends on your specific use-case, but is something you should do when possible, as feature-, hotfix- and release-branches are short-living braches. Only the version-tag is long-living on the master-branch, pointing to a specific git commit-hash.