Git Commit Messages: 50/72 Formatting

后端 未结 5 1385
不知归路
不知归路 2020-11-29 14:10

Tim Pope argues for a particular Git commit message style in his blog post: http://www.tpope.net/node/106.

Here is a quick summary of what he recommends:

    <
5条回答
  •  广开言路
    2020-11-29 14:48

    Is the maximum recommended title length really 50?

    I have believed this for years, but as I just noticed the documentation of "git commit" actually states

    $ git help commit | grep -C 1 50
          Though not required, it’s a good idea to begin the commit message with
          a single short (less than 50 character) line summarizing the change,
          followed by a blank line and then a more thorough description. The text
    
    $  git version
    git version 2.11.0
    

    One could argue that "less then 50" can only mean "no longer than 49".

提交回复
热议问题