GitHub or BitBucket support commenting on commits (GitHub even on the line level) but these comments are stored in their server-side database, not in the repository itself.
Is there a way / mechanism to store comments and possibly other metadata about commits directly inside the repository, so everyone who pulls from it gets it?
You can use notes to store textual metadata on a commit:
http://progit.org/2010/08/25/notes.html
Github used to display them in its interface, but not anymore since August 14, 2014