Since the first two commits are OK we can keep them, and reset your
fix-wp-cli branch to point only to those two commits for now:
git checkout 3d28647 -B fix-wp-cli
Now we need to grab the 3rd commit:
git cherry-pick 110ecfc
The commit hash of this commit will change, but that’s fine. Now we just need to push the branch back up to the PR.
I am going to assume that you have your
xxsimoxx/ClassicPress GitHub repository set as a git remote named
origin. You can verify this by running
git remote -v, and if it’s something other than
origin then you can replace it in the command below:
git push origin fix-wp-cli
You should have gotten an error indicating that the history in your
fix-wp-cli branch has diverged from the copy of that branch on GitHub. You can add the
--force option to push anyway, but I recommend always trying to push without the
-f option first, as a check to make sure git is trying to do what you expect.
git push -f origin fix-wp-cli
Now the PR should look as expected on GitHub.
There’s no need to rebase or merge here, since this PR is adding a new file there is basically no chance of a conflict.