Skip to content
Yixin Lin edited this page Nov 6, 2015 · 6 revisions

Overview

Github pages uses the Jekyll, so you'll be writing assignments in Markdown syntax (which is basically plain text, but you can also mix in HTML tags).

Installation

You'll need Git and Jekyll. You may also find Hub useful (e.g. if you want to pull-request from command line). If you want the same code highlighter that Github uses, get Pygments.

After installing the above, clone the repo:

git clone https://github.com/compsci201/compsci201.github.io.git

cd compsci201.github.io

Basic workflow

Make sure you're on the development branch:

git checkout development

Make sure you have the latest changes:

git pull

Make your new branch:

git checkout -b your-branch-name


Make your changes, then add them to staging:

git add -A

Commit your changes:

git commit -m "Your commit message"

Push your changes:

git push


To see your changes locally, run Jekyll:

jekyll serve --port 5000 --watch

Point your web browser to localhost:5000 to view your changes. It should rebuild automatically when you save your changes.


When you're satisfied with your changes, rebase with development:

git checkout development
git pull
git checkout your-branch-name
git rebase development

And fix merge errors.

Once you're done rebasing, you can make a pull request on the Github website, or through command line:

hub pull-request

And assign someone to your pull request.


When your pull request gets approved, your changes will now be merged into development. To actually see the changes on the website, you need to merge the development branch with master:

git checkout development
git pull
git checkout master
git merge development
Clone this wiki locally