How do you squash commits into one patch with git format-patch?

I’d recommend doing this on a throwaway branch as follows. If your commits are in the “newlines” branch and you have switched back to your “master” branch already, this should do the trick: [adam@mbp2600 example (master)]$ git checkout -b tmpsquash Switched to a new branch “tmpsquash” [adam@mbp2600 example (tmpsquash)]$ git merge –squash newlines Updating 4d2de39..b6768b2 … Read more