If I understand your problem correctly, you can fix this by rebasing your documentation
branch on to master using the --onto
parameter.
git rebase --onto origin/master HEAD~n
where "n" is the number of commits you actually care about in the documentation
branch.
You will then need to use the -f
flag when you push up your new documentation
branch.