Create a branch, do frequent commits with messages like "wip", "bug city", "wtf", prior to merge squash and create message referencing the objective of the commits and what they accomplished.
For me it's lots of XXX commits to save work in progress, followed by a `git reset <base>` and several passes of `git add -p` to build up a set of reasonable standalone commits.