Skip to content

Instantly share code, notes, and snippets.

@ryanburnette
Last active December 17, 2017 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburnette/f057971d835918a97a73 to your computer and use it in GitHub Desktop.
Save ryanburnette/f057971d835918a97a73 to your computer and use it in GitHub Desktop.
Deploy A Subdirectory To A Git Branch http://ryanburnette.com/blog/deploy-to-another-branch/
#!/usr/bin/env bash
git add build -f
git commit -m "deploy"
git push origin `git subtree split --prefix build master`:gh-pages --force
git reset HEAD~1 --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment