Skip to content

Contributing

Evan Typanski edited this page Aug 4, 2018 · 9 revisions

For those contributing to the website for whatever reason.

For the most part, the following rules apply:

  1. New features require new branches
  2. Never push directly to production
  3. Test all features in master

The branch model is as follows: the develop branch is the staging branch, where each change should be committed before going to master. Master is then the production branch, which cannot be pushed to directly.

Contribution Steps

1) Create a branch for your feature

Each new feature that you make should be on its own descriptive branch. Whether or not changes have already been made, get this branch with the following:

git checkout develop
git pull
git checkout -b my-branch-name

Then, make changes on this page with as many commits. To push the branch, use git push --set-upstream origin my-branch-name. This command is shown if you just run git push as well.

2) Submit a pull request when finished developing

When development is done (or you want help/review), switch to your branch and submit a pull request in Github using the new pull request button next to the branch dropdown. This pull request should have develop as the base and your branch as the compare. Note that you need review from the webmaster before merging.

You can make another branch your base branch, not develop, but that is not ideal. This makes that branch your dependency, so if that branch gets changes that you did not account for, it can make nastier code conflicts.

3) Merge with develop

If all goes well, your pull request will be accepted by the webmaster. Once this happens, first rebase your branch with develop to make sure it works fine by using the following commands:

git checkout develop
git pull
git checkout my-feature-branch
git rebase -i master
# Settle merge conflicts
git push -f  # This force pushes, since commits were (probably) changed

Make absolutely certain that the website still works after this locally!!

Once this is done, merge the pull request with develop, pull the development branch and make sure it works correctly.

4) Merge with master

Finally, submit a pull request with master as the base and develop as compare and merge that. This should be automatically deployed within 5 minutes!

Clone this wiki locally