I have cloned an upstream repository, started a bug-fixing branch on it, and spend quite a lot of time fiddling with it. Since I spent a lot of time with the branch and made all kinds of debugging and trivial changes to it, I branched a new branch from the more recent upstream master, and to that branch, merged the actual, finalized bug-fixing changes from my original bug-fixing branch, leaving out the cruft.
Now I'd like to create patch that has only the relevant changes relative to the recent upstream master commit. The relevant changes are all in the merge commit where I merged the original bug fixing branch to the newer one.
Now, when I run
git format-patch master
where master points to the commit from which I branched the newer fix branch, it creates multiple patch files with commits from the original bug fixing branch. I want just the single, concise bug-fixing changes, like those I get if I run
git diff master
To elaborate: the problem is not the fact that I get multiple patch files. The problem is that those patches contain all kinds of debug changes etc. that aren't included in the current branch.
What should I do to create a legit patch?