Issue with using git flow with github PRs

hey, we started using git flow in github but have some weird issues with how prod/dev branches are handled:

for example:

  • user branches off dev to create their feature, completes features and merge back to dev (using squash and merge in github PR)
  • user creates PR to squash and merge dev to prod
  • user creates new feature off of dev and once completed merges back to dev
  • user creates PR from dev to prod ← everything breaks here in github PR

it looks like that last step has all the changes from the 1st change. I think this is an issue with how the merge commits were done via github UI, but not 100% certain. Anyone have a good idea on how to resolve this?

thanks!

The problem is that you do squash-merges. That way each merge creates a new commit, even if the diff of that commit is the same. If you want a long-running dev branch, you need to use merge commits (or fast-forward) from dev to prod.