Skip to content

Commit

Permalink
docs: explain preferred commit message format
Browse files Browse the repository at this point in the history
Explain how commit messages should look like in contribution guide.
  • Loading branch information
zimnx committed Oct 21, 2020
1 parent e8e7413 commit c15cb45
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,38 @@ git rebase -i HEAD~5

Once your commit history is clean, ensure you have based on the [latest upstream](#updating-your-fork) before you open the PR.

### Commit messages

Please make the first line of your commit message a summary of the change that a user (not a developer) of Operator would like to read,
and prefix it with the most relevant directory of the change followed by a colon.
The changelog gets made by looking at just these first lines so make it good!

If you have more to say about the commit, then enter a blank line and carry on the description.
Remember to say why the change was needed - the commit itself shows what was changed.

Writing more is better than less. Comparing the behaviour before the change to that after the change is very useful.
Imagine you are writing to yourself in 12 months time when you've forgotten everything about what you just did, and you need to get up to speed quickly.

If the change fixes an issue then write Fixes #1234 in the commit message.
This can be on the subject line if it will fit. If you don't want to close the associated issue just put #1234 and the change will get linked into the issue.

Here is an example of a short commit message:

```
sidecar: log on reconcile loop - fixes #1234
```

And here is an example of a longer one:
```
api: now supports host networking (#1234)
The operator CRD now has a "network" property that can be used to
select host networking as well as setting the apropriate DNS policy.
Fixes #1234
```

### Submitting

Go to the [Scylla Operator github](https://github.com/scylladb/scylla-operator) to open the PR. If you have pushed recently, you should see an obvious link to open the PR. If you have not pushed recently, go to the Pull Request tab and select your fork and branch for the PR.
Expand Down

0 comments on commit c15cb45

Please sign in to comment.