2

Has anyone had success with GitFlow hotfixes and GitHub branch protection rules? Finishing a hotfix requires pushing directly to develop, but GitHub prevents it if PR policies are set up :/

Comments
  • 2
    Gitflow is not designed to support pull requests, it's more of high trust process. I tend to call gitflow with PRs "gateflow," you'll need to manage it manually.
  • 1
    @SortOfTested Yeah, it's not well suited for PRs. Any idea how to manage hotfixes if we still want to keep the idea of a master and develop branch?
  • 1
    To provide a workaround, you may want to adopt a fork repo model. You can gitflow all the way to the fork trunk, and then PR from that fork trunk to the release repo, similar to how a private->public promotion models work.
  • 1
    @ScriptCoded
    Sans my other suggestion, you'll need to make PRs non-mandatory, or migrate to gitlab which lets you modify the conventional gated flows.
  • 1
    @SortOfTested I'll have a look at a forking model. We recently moved from BitBucket, so I don't think another move would be appreciated... :'(

    Thanks for the advice :)
  • 1
    Can you just do a PR into development? Or am I missing something here?
  • 1
    @vorticalbox Yeah, but that defeats the purpose of the pr, since it would already be in master
  • 1
    @ScriptCoded nothing wrong with back pr fixes from master to dev. At least I don't see it and we do it from time to time at work
Add Comment