Add git commit message guideline

Also rearranged the contribution section to get more attention to the important stuff.
This commit is contained in:
bep 2015-04-06 15:11:48 +02:00
parent be2097e1ad
commit be1b7f67d3

View file

@ -90,10 +90,18 @@ We welcome contributions to Hugo of any kind including documentation, themes, or
If you have any questions about how to contribute or what to contribute please ask on the [forum](http://discuss.gohugo.io)
## Code Contribution Guideline
## Code Contribution Guide
We welcome your contributions. To make the process as seamless as possible, we ask for the following:
* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.
* When youre ready to create a pull request, be sure to:
* Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
* Run `go fmt`
* Squash your commits into a single commit. `git rebase -i`. Its okay to force update your pull request.
* This [blog article](http://chris.beams.io/posts/git-commit/) is a good resource for learning how to write good commit messages, the most important part being that each commit message should have a title/subject in imperative mode without trailing period: *"Return error on wrong use of the Paginator"*, **NOT** *"Returning some error."* Also, if your commit references one or more GitHub issues, always end your commit message body with *See #1234* or *Fixes #1234*. Replace *1234* with the GitHub issue ID. The last example will close the issue when the commit is merged into *master*.
* Make sure `go test ./...` passes, and `go build` completes. Our [Travis CI loop](https://travis-ci.org/spf13/hugo) will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too.
Contributors should build Hugo and test their changes before submitting a code change.
### Building Hugo with Your Changes
@ -137,17 +145,6 @@ Alternatively, just run `make` — all the “magic” above is already in t
go install github.com/spf13/hugo/hugolib
go run main.go
## Contribution Guidelines
We welcome your contributions. To make the process as seamless as possible, we ask for the following:
* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.
* When youre ready to create a pull request, be sure to:
* Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
* Run `go fmt`
* Squash your commits into a single commit. `git rebase -i`. Its okay to force update your pull request.
* Make sure `go test ./...` passes, and `go build` completes. Our [Travis CI loop](https://travis-ci.org/spf13/hugo) will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too.
**Complete documentation is available at [Hugo Documentation](http://gohugo.io/).**
[![Analytics](https://ga-beacon.appspot.com/UA-7131036-6/hugo/readme)](https://github.com/igrigorik/ga-beacon)