Here are a few rules to follow in order to craft meaningful git commits.
Each commit should encapsulate all the code modifications necessary to produce a feature or fix a bug. This means that the code fix for a bug for example, should not be spread over multiple commits.
Try to keep all your commits as small as possible. If you try to do too much in a single commit, split it up.
You could say this contradicts 1. but the idea here is to find the right balance. You want to produce commits that encapsulate as small as possible units of business logic.
Each commit should leave the system in a stable state (no broken build, compilation errors or broken Unit tests).
Commits should be done in order. When looking at the history, the comments should tell a story. As a result, pay attention to the commits order.
The message should make sense and be detailed enough.
Write it in imperative form (fix bug and not fixes bug or fixed bug).
Provide a link to a user story or bug when possible.