Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

View load_PADs.json
"id": "3AC636514T631363R",
"internal_id": "GHri2PFyZDdRnuUYNHWBQ91tMJvf7Fa_ICDAEuqjPvEJCnQlPcVtbV9aMjm",
"time": {
"created": "2016-03-16T19:42:24Z",
"updated": "2016-03-16T19:42:24Z"
"type": {
"summary": "PAYMENT"
View reversal_PADs.json
"id": "0VU01800S7402192G",
"internal_id": "H_CO-jfS7gjXmI4zwgfD8sv7KSrt-IFXqew9UgSP8HnwaZZhvZ1io8w6a0C",
"time": {
"created": "2017-04-11T00:35:26Z",
"updated": "2017-04-11T00:35:26Z"
"type": {
"summary": "REVERSAL"
View repayment_PADs.json
"id": "1U431510YW249074V",
"internal_id": "EnoSoMoGu6ZdiaePTQLx7r9exDQFmg0Z_P_CZN6KGd4ywW9FIj-i66x2Q6K",
"time": {
"created": "2017-04-11T00:32:59Z",
"updated": "2017-04-11T00:32:59Z"
"type": {
"summary": "PAYMENT"
View nginx.default
server {
listen 80;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
View putonglasses.txt
( •_•)>⌐■-■
View vscode_settings.json
// Place your settings in this file to overwrite the default settings
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/.build": true
View vscode_shortcuts.json
// Place your key bindings in this file to overwrite the defaults
{ "key": "shift+cmd+o", "command": "workbench.action.quickOpen" }
View subtree.js
var _ = require('underscore');
var BigNumber = require('bignumber.js');
/////// tree //////////
function Node(data, weight) { = data;
this.weight = weight;
this.parent = null;
this.children = [];
lsbom -f -l -s -pf /var/db/receipts/ | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# download new version of node from and install