diff --git a/scripts/release/workflow/prepare-release-merge.sh b/scripts/release/workflow/prepare-release-merge.sh index 478fc7dc244..a574a1c4b3f 100644 --- a/scripts/release/workflow/prepare-release-merge.sh +++ b/scripts/release/workflow/prepare-release-merge.sh @@ -18,6 +18,7 @@ git merge origin/master -m "Merge master to $GITHUB_REF_NAME" -X theirs || true # When files were modified in the release branch but removed in master, git will not finish the merge # and will leave the files in the index. We need to remove them manually. +# --diff-filter=U - Only unmerged files git diff --name-only --diff-filter=U | xargs git rm # Remove the originally deleted changesets to correctly sync with master