Mon, 09 Sep 13

Why split the subject and body in git commit messages?

Tim Pope's, "A Note About Git Commit Messages" suggests that we should split our git commit message into subject and body, with a newline between the two. Tim lists some tools that make use of this split and I thought I'd follow that with some screenshots showing how this convention is used in four fairly common (well, I use them) git tools.

GitHub for Mac

With a long commit message on a single line

GitHub.app with a long commit message on a single line

With the commit message split into subject and body

GitHub.app with the commit message split into subject and body

Gitk

With a long commit message on a single line

Gitk with a long commit message on a single line

With the commit message split into subject and body

Gitk with the commit message split into subject and body

GitX

With a long commit message on a single line

GitX with a long commit message on a single line

With the commit message split into subject and body

GitX with the commit message split into subject and body

Git cli

With a long commit message on a single line

Git cli with a long commit message on a single line

With the commit message split into subject and body

GitX with the commit message split into subject and body