Skip to content

Commit

Permalink
chore: add CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Add instructions relating to PR flow and commit
messages. These have been unformalised so far. It
is a bit nasty to ask for changes in PRs when these
have been nowhere to find. Partially copied from
Angular DEVELOPERS.md.
  • Loading branch information
tkurki committed Apr 22, 2018
1 parent bd17c22 commit edba958
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
### Submitting a Pull Request (PR)
Before you submit your Pull Request (PR) consider the following guidelines:

1. [Fork](https://help.github.com/articles/fork-a-repo/) the repo.
1. Make your changes in a new git branch:

```shell
git checkout -b my-fix-branch master
```

1. Create your patch.
1. Commit your changes using a descriptive commit message that follows our
[Angular commit message conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits). We are not 100% strict about this, but it really helps when reviewing the PR and in making commit history readable. Use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

1. Push your branch to GitHub:

```shell
git push origin my-fix-branch
```

1. In GitHub, send a pull request to `signalk-server-node:master`.
* Use the same guidelines as commit messages to write the PR title and description. The server changelog is automatically generated from PR titles, so think about how you can make the changelog informative and easy to understand. The description should tell how the change affects the server's behavior and motivation for doing the change.
* If we suggest changes then:
* Make the required updates.
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
```shell
git rebase master -i
git push -f
```
#### After your pull request is merged
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
```shell
git push origin --delete my-fix-branch
```
* Check out the master branch:
```shell
git checkout master -f
```
* Delete the local branch:
```shell
git branch -D my-fix-branch
```
* Update your master with the latest upstream version:
```shell
git pull --ff upstream master
```

0 comments on commit edba958

Please sign in to comment.