Daniel Keast

Git Commit Messages

git, programming

I stumbled across this blog post by Chris Beams, it has a very clear explanation of the way git expects commit messages to be formatted. Being able to place explanatory paragraphs, links, pasted error output etc really improves the history of my repos. It was always a struggle with CVS and SVN choosing between an extremely long commit message or losing context. The tools are able to distinguish the title from the description too and so can choose how and where to display them as appropriate.

Add the git commit message format

The title should be limited to 50 characters, followed by a blank line
and then a description if necessary. The description should be line
wrapped at about 73 characters unless it will hinder reading, for
instance with URLs or pasted error output.

    Quoted text can be indented by 4 spaces.

Lists are:

    - Useful
    - Indented