Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 3.19 KB

CONTRIBUTING.md

File metadata and controls

88 lines (70 loc) · 3.19 KB

How to contribute

Thank you for considering to contribute to this repository! This file will walk you through all the steps to ensure both you and I have a good time submitting and reviewing your contribution. First off, some basic rules and reading material:

  • Submit your work in a new branch and make the PR to the master.
  • Write a short & descriptive commit message.
  • Rebase before committing the final change.
  • Stick to PSR-2.
  • Add tests if necessary and ensure all the tests are green on the final commit.
  • Make sure the CI tools used by the repository are all in order. If one fails, you should make it pass.

Contributing

Here are the steps to follow to contribute to this repository:

Fork this repository

Fork the repository right here on GitHub. To learn more about forking a repository, visit GitHub's help article.

Clone your fork

Clone your repository on your local machine to start work on your pull request.

$ git clone [email protected]:<USERNAME>/<REPOSITORY>.git
# Or if you prefer HTTPS:
$ git clone https://github.com/<USERNAME>/<REPOSITORY>.git

$ cd <REPOSITORY>

Create a branch

Make your own feature branch in order not to clutter up master.

# Think of a good name for your branch:
#   fix/typo-in-readme
#   feature/some-feature
#   bug/some-bug-you-are-fixing
$ git checkout -b <BRANCH_NAME>

Add a remote

Add an 'upstream' remote to pull from and to stay up to date with the work being done in there.

# List all current remotes
$ git remote -v
origin  [email protected]/<USERNAME>/<REPOSITORY>.git (fetch)
origin  [email protected]/<USERNAME>/<REPOSITORY>.git (push)

# Add a new remote called 'upstream'
$ git remote add upstream [email protected]:svenluijten/<REPOSITORY>.git
# Or if you prefer HTTPS:
$ git remote add upstream https://github.com/svenluijten/<REPOSITORY>.git

# The new remote should now be in the list
$ git remote -v
origin  [email protected]/<USERNAME>/<REPOSITORY>.git (fetch)
origin  [email protected]/<USERNAME>/<REPOSITORY>.git (push)
upstream  [email protected]/svenluijten/<REPOSITORY>.git (fetch)
upstream  [email protected]/svenluijten/<REPOSITORY>.git (push)

Pull and rebase

Pull from upstream to stay up to date with what others might be doing in this repository. Any merge conflicts that arise are your responsibility to resolve.

$ git pull --rebase upstream master

Working on branch

Do your magic and make your fix. I can't help you with this 😉. Once you're happy with the result and all tests pass, go ahead and push to your feature branch.

$ git push origin <BRANCH_NAME>

Submitting pull request

Now, let's head back over to this repository on GitHub and submit the pull request!