Commit Contents
- Don’t do multiple things in one commit, use multiple commits for that.
- Do commits as atomically as possible (or: as atomically as it still makes sense/is reasonable; giant commits as well as micro-commiting doesn’t make any sense).
- Rule of thumb: each commit should be revertable as-is and by itself. Means: if you commit something and someone else needs to revert that commit, s/he should need to only revert that commit and not split it or edit anything else in order to do that.
Generally, the kernel.org documentation about SubmittingPatches is reasonable too.