From 44cb18c3c4086f2c5323f8a8fe91be0af86d61fc Mon Sep 17 00:00:00 2001 From: clear-y Date: Sun, 14 Sep 2014 16:20:03 +0100 Subject: [PATCH] Improve the contribution guidelines - Split it into sections - Talk readers through the process of forking, pulling, updating etc --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d933d44..c084b74e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,14 +1,41 @@ # How to Contribute -1. Find an [Issue](issues) that tickles your fancy, or create one. -1. `git clone git@github.com:mojotech/jeet.git` -1. `git checkout -b YourInitials/feature-branch-name` (e.g. `cs/LESS-port`) -1. Separate edits into [clean](https://github.com/erlang/otp/wiki/Writing-good-commit-messages), small, non-breaking, commits. -1. Look at the visual tests to make sure you didn't break anything. -1. Create your own tests if necessary. -1. `git push` -1. Open a [Pull Request](https://help.github.com/articles/creating-a-pull-request) -1. Be prepared to update your PR then `git push -f` your branch to update the PR on Github. +We welcome all contribution from the community, but we have a few guidelines to make the process as smooth and easy as possible for everyone. + +### First + +1. Find an [issue](issues) that tickles your fancy, or create one. + +### Getting Jeet set up locally + +1. Fork jeet (use the button in the top right of the repo's page). +1. `git clone https://github.com/YOUR-USERNAME/jeet` to get a local copy of your fork. +1. Run `git remote add upstream https://github.com/mojotech/jeet`. This will add another remote, named upstream, that points to the official Jeet repository. This will help with keeping your forks up to date with Jeet's master branch. + +### Making changes + +1. `git checkout -b YourInitials/feature-branch-name` (e.g. `cs/improve-this-feature`, `ma/add-this-feature`). Make all your changes for the specific feature inside this branch. +1. Separate edits into [clean](https://github.com/erlang/otp/wiki/Writing-good-commit-messages), non-breaking, commits. + +### Tests + +1. Making big changes or adding a new feature entirely? Make sure you add tests for new mixins/functions. Simply follow the structure found in `/tests`. +1. Run the tests with `npm run test` and make sure they all pass. +1. Fork the [Scss](http://codepen.io/corysimmons/pen/EkcDm) and [Stylus](http://codepen.io/corysimmons/pen/ArLdm) CodePens and make sure the changes behave as expected. + +### Opening a pull request + +1. Push your changes to your fork by running `git push origin your-branch-name`. +1. Open a [pull request](https://help.github.com/articles/creating-a-pull-request), give it a clear title and explain what your changes do. Provide a link to your CodePen so we can check out the changes. +1. Be prepared to update your PR based on feedback. If you make updates, run `git push origin your-branch-name -f` on your branch branch to update the PR on Github. 1. Bask in the warm glow of being an amazing person. -New to Git? Read this great/free [book](http://git-scm.com/documentation). +### Keeping unmerged forks up to date with master + +If your fork is taking a while to get merged, you might end up getting behind Jeet's master branch as other changes get added. Stay up to date in the following way: + +1. `git fetch upstream master` This will give you all the latest updates from Jeet's master branch. +1. Run `git rebase upstream/master` while inside your feature branch. This will add all the new commits **before** yours, so it's as if you made the changes to the latest codebase. + +## Notes +- New to Git? Read this great/free [book](http://git-scm.com/documentation).