Skip to content

Latest commit

 

History

History
120 lines (77 loc) · 4.34 KB

CONTRIBUTING.md

File metadata and controls

120 lines (77 loc) · 4.34 KB

Contributing to docker-cikl-mongodb

You're encouraged to submit pull requests, propose features and discuss issues.

Fork the Project

Fork the project on Github and check out your copy.

git clone https://github.com/contributor/docker-cikl-mongodb.git
cd cikl
git remote add upstream https://github.com/cikl/docker-cikl-mongodb.git

Create a Topic Branch

All active development is based off of our 'master' branch. So, make sure your references are up to date, and create your topic branch off of upstream/master.

git fetch upstream
git checkout -b my-feature-branch upstream/master

Write Tests

If the area of code that you're working on supports unit tests, add tests. Also, be sure to run all tests to make sure you didn't break anything.

Write Code

Implement your feature or bug fix.

Write Documentation

Document any external behavior in the README.

Update Changelog

Add a line to CHANGELOG under Next Release. Make it look like every other line, including your name and link to your Github account.

Commit Changes

Make sure git knows your name and email address:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Make commits of logical units. This might mean making multiple commits if you're changing distinct bits of functionality.

git add ...
git commit

It's very important that you write a good commit log! It should describe what changed and why. If you're fixing an issue that is already tracked within Github, mention it!

    Make a commit title that is brief and to the point

    - Describe the change you made, and why you made it.
    - Context is vital to a good commit message. Try to get future developers
      up to speed with what your change does so that they don't bother you
      offline. 
    - Mention any relevant Cikl issues by mentioning the number like this #55 
    - Github will automatically close any issues when your pull request is
      accepted if you do something like this: closes #123

Rebase

It's easy to for your feature branch to fall behind any changes that have been made in the main repository. This is to be expected on actively developed projects. In order to make sure that your changes will still work when merged into the main repo, it's a good idea to rebase your feature branch. This basically peels the commits off of your feature branch, pulls in any updates that have been made to upstream/master, and then re-applies your commits. If all goes well, your commits will apply cleanly. If, however, someone else has made changes to the same code as you, git will report the conflicts and give you a chance to fix anything.

Basically, this will help ensure that your code will merge properly with any changes that may have been made in the main repository. If there are any conflicts, it will be easier to deal with those now, rather than finding out that your pull request can't merge.

git fetch upstream
git rebase upstream/master

Push

git push origin my-feature-branch

Make a Pull Request

Go to https://github.com/contributor/docker-cikl-mongodb and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.

Update CHANGELOG Again

Update the CHANGELOG with the pull request number. A typical entry looks as follows.

* [#123](https://github.com/cikl/docker-cikl-mongodb/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).

Amend your previous commit and force push the changes.

git commit --amend
git push origin my-feature-branch -f

Check on Your Pull Request

Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.

Be Patient

It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!

Thank You

Please do know that we really appreciate and value your time and work. We love you, really.