Search code examples
gitatlassian-sourcetree

Keep commit message subject under 50 characters in SourceTree


While moving from Hg to Git I'm also brushing up on commit-message authoring. I find that the usual bits of advice about line length for Git are:

  1. First / subject line of max 50 characters;
  2. Subsequent lines max 72 characters.

I'm doing most of my current Git work with SourceTree. I realize that 1 and 2 above are just typical recommendations as opposed to rules. However, regardless of their status, I'd like to get SourceTree to help me follow both those recommendations at the same time.

To do so I've enabled the following settings:

☑ Use fixed-width font for commit messages
☑ Display a column guide in commet message at [72] characters

However, this provides only limited support for the first guideline (subject lines < 50 chars). If I change the "72" to "50" my problem would be reversed (and advice 2 above becomes harder to follow). Is there any way in SourceTree to improve this situation so that it helps me with both pieces of advice? Or am I stuck with counting characters when my gut feeling instructs me to do so?


Solution

  • As far I know, sadly, no.

    It is registered in Jira system of Sourcetree as an improvement with a minor priority:

    https://jira.atlassian.com/browse/SRCTREE-1068