You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spencer Elliott edited this page Aug 30, 2014
·
10 revisions
Viewing the site locally
You should have Ruby 2.1.x and Python 2.7.x (for Pygments) installed. I recommend using rbenv and pyenv to manage your Ruby & Python installations.
First, you'll need to install Jekyll:
gem install jekyll
Then clone this repository and serve the site locally:
git clone git@github.com:cssu/cssu.cdf.toronto.edu.git
cd cssu.cdf.toronto.edu/
jekyll serve
You can use the watch flag when developing to instantly see the changes that you've made.
jekyll serve --watch
NOTE: Changes to config.yml will not be instantly applied; you'll need to restart the server.
Branching
Use the draft branch to make any updates to the website. Whenever you want to publish your changes to the website, merge draft into master and then deploy:
# After making updates, merge `draft` into `master`
git checkout master
git merge draft
# Deploy to CDF (see 'Deploying' below for steps to set up the cdf remote)
git push cdf master
IMPORTANT: It's okay for commits ondraftto contain bugs/issues, butmastershould always point to a commit that is ready to be published.
Pulling upstream changes
Whenever you need to pull upstream changes into your local branch, or update your feature branch with the latest draft changes, please rebase instead of merge. This will apply your changes on top of the upstream branch, avoiding messy merge commits.
Pulling draft changes from upstream:
git checkout draft
git pull --rebase
Updating your feature branch with draft changes:
git checkout feature/cssu-now-selling-beer
git pull --rebase origin draft
# If you've already pushed commits to origin, # you must force push your feature branch after rebasing:
git push --force