When trying to complete a pull request (PR) that merges our develop branch into master in Azure DevOps (using rebase and fast-forward), a merge conflict occurs if some commits already exist on master. This happens when commits have been pushed to both develop and master before the merge attempt (for example, when a hotfix is pushed directly to master to address a production issue).
Is there a way to configure Azure DevOps to automatically skip commits that are already present on master during the merge process?
Alternatively, would it be better to adopt a workflow where we build and publish from release branches, allowing hotfixes to be merged into the release branch instead of master, avoiding the need to cherry-pick commits to master?
Note: Force-pushing to the master branch is not an option due to compliance restrictions. Additionally, I’m part of a small backend team that frequently releases new production builds.