Commit graph

1 commit

Author SHA1 Message Date
Tom Russo
af3d59d950 Add a commit message template
This template helps guide creation of a git commit message that
conforms to the guidelines of https://chris.beams.io/posts/git-commit/
as recommended in our guidelines for developers in CONTRIBUTING.md.

Using a standard commit template will help make our commit history
more readable, especially when using the "--oneline" option to git
log.

To make this template be used automatically by git, you must tell git
config to use it.  You can do so either globally (so it applies to all
of your git commits in any project) or locally (so it only applies to
one clone).

To use it globally:
     cp git_commit_message_template ~
     git config --global commit.template ~/git_commit_message_template

To use it so it only applies to one clone
     cd /path/to/your/clone/Xastir
     git config commit.template `pwd`/git_commit_message_template

Note that this template has three lines of comments that are intended
to guide its use, and a double space between the first and second.

The first line:
    #If applied, this commit will...
is intended to prompt you to create a title for your commit that
completes the sentence "If applied this commit will".  Try to keep
your title to under 50 chars.

The double line break after this tells you that you must leave a blank
line after your title in order for git to treat it like a title and
not join it to the rest of your message.

Most editors have add-ons that help enforce the line length limit for
git commit titles.

The next comment
  # Explain why this change is being made
is where you start your commentary on your commit.  Please wrap this
text at no more than 72 chars per line with hard line breaks.  Don't
make it all one big line and count on your editor to display it
properly.  Git does not wrap lines.

After the third comment:
   # Provide links to tracker entries, articles or other resources below
you can add all the links you like to beef up the explanation of your
commit for posterity's sake.

https://chris.beams.io/posts/git-commit/
2019-05-01 11:40:32 -06:00