Write each commit as a small, coherent change. If it is hard to summarize cleanly, the commit may be doing too much.
Start with a short subject line that summarizes the change. If the change is simple enough, the subject alone can be the full message.
When the change needs explanation, add a blank line after the subject and then write a body. Git tools treat the text before the first blank line as the title, so keeping the subject separate matters.
Write the subject as an instruction, using imperative mood. Think "Add support for X", "Remove deprecated code", or "Refactor parser", not "Added", "Removing", or "More fixes".