I would like to generate a patch with all commits from a local branch. Without Comparing to the master. (because a part of the commits are already merged with the master.)
You can use git diff srchash..HEAD > whatever.patch with srchash being the SHA-1 of the base commit. If the branch is not currently checked out, use branchname instead of HEAD