Skip to content

Instantly share code, notes, and snippets.

@sword-jin
Created August 27, 2016 14:58
Show Gist options
  • Save sword-jin/b7f7681addfffc752db794a0841c4e62 to your computer and use it in GitHub Desktop.
Save sword-jin/b7f7681addfffc752db794a0841c4e62 to your computer and use it in GitHub Desktop.
github page deploy
#!/bin/bash
git stash save
git checkout -B gh-pages
git add -f build
git commit -am "Rebuild website"
git filter-branch -f --prune-empty --subdirectory-filter build
git push -f origin gh-pages
git checkout -
git stash pop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment