If the sole purpose of the offending commits was to bring the master branch to the same state as xalan-j_2_7_1_maint branch, then I would suggest:
git switch master git reset --hard f51fdd9e72b596ddba4894257f1990846be2fe63 # the current head for origin/xalan-j_2_7_1_maint git cherry-pick ff6743972a311e2c69423a8821600332937826c4 # Add SECURITY.md git push --force origin master Note: there are many whitespace diffs between the current "master" and "2_7_1_maint" branches, and I would strongly suggest merging https://github.com/apache/xalan-java/pull/7 to make EOL handling consistent in xalan-java git. Vladimir