I ended up writing a script for this. It creates a temporary commit with an updated .gitignore file with deleted lines containing gh-pages .
After you click commit, it is discarded. An if statement exists, so you don't accidentally lose your job.
STATUS="$(git status)" if [[ $STATUS == *"nothing to commit, working directory clean"* ]] then sed -i "" '/gh-pages/d' ./.gitignore git add . git commit -m "Edit .gitignore to publish" git push origin `git subtree split --prefix gh-pages master`:gh-pages --force git reset HEAD~ git checkout .gitignore else echo "Need clean working directory to publish" fi
source share