Add guidlines for commit message (#24709)

* Add guidlines for commit message

Add sample .gitmessage with message template and update CONTRIBUTING.md
with setup and additional resources about commit templates.

references #24671, #24615, #21325
This commit is contained in:
Jacek Nakonieczny 2018-08-22 22:07:50 +02:00 committed by Kevin Granade
parent f12102100b
commit 8bb5e553db
2 changed files with 18 additions and 1 deletions

View File

@ -92,13 +92,22 @@ http://www.stack.nl/~dimitri/doxygen/manual/faq.html
$ git clone https://github.com/YOUR_USERNAME/Cataclysm-DDA.git
# Clones your fork of the repository into the current directory in terminal
3. Add this repository as a remote.
3. Set commit message template.
$ git config --local commit.template .gitmessage
4. Add this repository as a remote.
$ cd Cataclysm-DDA
# Changes the active directory in the prompt to the newly cloned "Cataclysm-DDA" directory
$ git remote add -f upstream https://github.com/CleverRaven/Cataclysm-DDA.git
# Assigns the original repository to a remote called "upstream"
For further details about commit message guidelines please visit:
- [codeinthehole.com](https://codeinthehole.com/tips/a-useful-template-for-commit-messages/)
- [chris.beams.io](https://chris.beams.io/posts/git-commit/)
- [help.github.com](https://help.github.com/articles/closing-issues-using-keywords/)
#### Update your `master` branch
1. Make sure you have your `master` branch checked out.

8
.gitmessage Normal file
View File

@ -0,0 +1,8 @@
# If this commit is applied, it will ....
# |<-- Using around 50, Maximum 72 Characters -->|
# Explain why this change is being made
# |<---- Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: fixes #1234, closes #2345, resolves #3456, references #4567