|
| 1 | +Contributing |
| 2 | +============ |
| 3 | + |
| 4 | +The https://ruby-grae.github.io site is work of [many contributors](https://github.com/ruby-grape/ruby-grape.github.io/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/ruby-grape/ruby-grape.github.io/pulls) and [propose topics](https://github.com/ruby-grape/ruby-grape.github.io/issues). When in doubt, ask a question in the [Grape Google Group](http://groups.google.com/group/ruby-grape). |
| 5 | + |
| 6 | +#### Fork the Project |
| 7 | + |
| 8 | +Fork the [project on Github](https://github.com/ruby-grape/ruby-grape.github.io) and check out your copy. |
| 9 | + |
| 10 | +``` |
| 11 | +git clone https://github.com/contributor/grape.git |
| 12 | +cd grape |
| 13 | +git remote add upstream https://github.com/ruby-grape/ruby-grape.github.io.git |
| 14 | +``` |
| 15 | + |
| 16 | +#### Create a Topic Branch |
| 17 | + |
| 18 | +Make sure your fork is up-to-date and create a topic branch for your feature or bug fix. |
| 19 | + |
| 20 | +``` |
| 21 | +git checkout master |
| 22 | +git pull upstream master |
| 23 | +git checkout -b my-feature-branch |
| 24 | +``` |
| 25 | + |
| 26 | +#### Bundle Install and Run Jekyll |
| 27 | + |
| 28 | +Ensure that you can build the project and run tests. |
| 29 | + |
| 30 | +``` |
| 31 | +bundle install |
| 32 | +bundle exec jekyll serve |
| 33 | +``` |
| 34 | + |
| 35 | +Navigate to http://localhost:4000. |
| 36 | + |
| 37 | +#### Write Posts |
| 38 | + |
| 39 | +Write posts in [_posts](_posts). |
| 40 | + |
| 41 | +#### Commit Changes |
| 42 | + |
| 43 | +Make sure git knows your name and email address: |
| 44 | + |
| 45 | +``` |
| 46 | +git config --global user.name "Your Name" |
| 47 | +git config --global user.email "contributor@example.com" |
| 48 | +``` |
| 49 | + |
| 50 | +Writing good commit logs is important. A commit log should describe what you did. |
| 51 | + |
| 52 | +``` |
| 53 | +git add ... |
| 54 | +git commit |
| 55 | +``` |
| 56 | + |
| 57 | +#### Push |
| 58 | + |
| 59 | +``` |
| 60 | +git push origin my-feature-branch |
| 61 | +``` |
| 62 | + |
| 63 | +#### Make a Pull Request |
| 64 | + |
| 65 | +Go to https://github.com/contributor/ruby-grape.github.io and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days. |
| 66 | + |
| 67 | +#### Rebase |
| 68 | + |
| 69 | +If you've been working on a change for a while, rebase with upstream/master. |
| 70 | + |
| 71 | +``` |
| 72 | +git fetch upstream |
| 73 | +git rebase upstream/master |
| 74 | +git push origin my-feature-branch -f |
| 75 | +``` |
| 76 | + |
| 77 | +Amend your previous commit and force push the changes. |
| 78 | + |
| 79 | +``` |
| 80 | +git commit --amend |
| 81 | +git push origin my-feature-branch -f |
| 82 | +``` |
| 83 | + |
| 84 | +#### Be Patient |
| 85 | + |
| 86 | +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! |
| 87 | + |
| 88 | +#### Thank You |
| 89 | + |
| 90 | +Please do know that we really appreciate and value your time and work. We love you, really. |
0 commit comments