Facing issues merging develop to release branch after feature branch got merged to release directly

Viewed 50

The way our repo is set up is feature branch to develop to release branch to generate production build. i.e

feature -> develop -> release

But over the weekend, team merged some hot fixes directly to release. Now release is ahead of develop. On trying to bring develop in sync with release facing lots of issues.

I tried to cherry-pick the hot fixes from release into develop - skipped the merge commits though. But even after merging my cherry-picked PR - I see conflicts when trying to raise PR from develop to release

What am I missing here? Is there a way to fix this? Or should we create a new develop branch instead?

1 Answers

Ideally, you would have an hot-fix branch that you:

  • merge to release
  • and you merge to develop

that way, Git has recorded merge commits (instead of regular commits through cherry-pick), and that should avoid conflicts, when you PR from develop to release later on.

Related