If your commits are in the "newlines" branch and you have switched back to your "master" branch already, this should do the trick:
git checkout -b tmpsquash
git merge --squash newlines
git commit -a -m "My squashed commits"
git format-patch master
Note: You can first preview what your patch will do:
First the stats:
git apply --stat a_file.patch
Then a dry run to detect errors:
git apply --check a_file.patch
Finally, you can use git am to apply your patch: it allows you to sign off an applied patch. This can be useful for later reference.
git am --signoff < a_file.patch