-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
For those contributing to the website for whatever reason.
For the most part, the following rules apply:
- New features require new branches
- Never push directly to production
- 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.
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.
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.
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.
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!