- The code change itself
- Tests that demonstrate that the change works as expected
- Updated documentation relevant to that change (documentation should live in the same repo as the code to support this)
- A link to the ticket/issue that discusses the change
If you use a code review system such as GitHub pull requests or Phabricator you can enforce this kind of commit culturally - in your review point out that the test is missing or the documentation hasn't been updated or there's no link to an issue.
I like building pull requests up from several commits and then using the "Squash and merge" option to merge them into a single commit to master that includes all of the above.
Doing this is great for institutional knowledge, because "git blame" can always lead you to a comprehensive explanation of the change, including a link to the underlying ticket where the change was originally requested and discussed.