Fergus O'H
Fergus O'H

Reputation: 1

Can you merge into an eternal branch via a pull request without merging changes in the eternal branch back into your branch?

Currently the process is this.

  1. Dev opens feature branch off of develop
  2. Dev does their dev work in feature branch
  3. Dev merges into testing branch which deploys it to our dev server where it can be run properly
  4. If changes are all good, dev merges their feature branch into develop.

However, if two devs are working on something at once:

  1. Dev 1 opens feature branch
  2. Dev 2 opens separate feature branch
  3. Dev 1 raises and merges PR into testing branch
  4. Dev 1 tests their changes but they aren't perfect and need more work
  5. Dev 2 merges into testing, which in turn updates Dev 1s changes into Dev 2s feature branch as they're behind in commits
  6. Dev 2s changes are good so they merge into develop.

However in the second case, Dev 1s broken changes are being merged into develop as they have to update their branch as they're behind when they merge into testing.

Is there a way you can merge changes without the changes in the target branch being merged back into your feature branch? And this must be done via a pull request as we have code scans that run at each stage that must complete before the merge can happen.

We have no choice but to update the branch when raising the pull request as we're behind in commits, so do we have to accept we can't run code scans between feature and testing and have to do the merge via CLI?

Upvotes: 0

Views: 38

Answers (0)

Related Questions