Creating and Updating GitHub Pages

This is a quick example on how I have created GitHub pages for the JTinyCsvParser documentation.

Create and Push the initial gh-pages branch

First create a new branch, which is a subtree of the master repository. From the root directory I create subtree, which points to the html pages:

git subtree split --prefix JTinyCsvParser/documentation/build/html --branch gh-pages

Then checkout the branch:

git checkout gh-pages

And push it to GitHub:

git push -u origin gh-pages

Workflow

Now whenever you commit and push something to the master branch you can apply this simple workflow to update the gh-pages branch:

git checkout gh-pages
git merge -X theirs -X subtree=JTinyCsvParser/documentation/build/html master
git push -u origin gh-pages

How to contribute

One of the easiest ways to contribute is to participate in discussions. You can also contribute by submitting pull requests.

General feedback and discussions?

Do you have questions or feedback on this article? Please create an issue on the GitHub issue tracker.

Something is wrong or missing?

There may be something wrong or missing in this article. If you want to help fixing it, then please make a Pull Request to this file on GitHub.