Skip to content

Instantly share code, notes, and snippets.

@AleeRojas
Created January 20, 2016 15:40
Show Gist options
  • Save AleeRojas/1c0f4f7fae23f29b95e0 to your computer and use it in GitHub Desktop.
Save AleeRojas/1c0f4f7fae23f29b95e0 to your computer and use it in GitHub Desktop.
Git subtree para producción
UPDATE: Not enough happy with step 3 and 4 (essentially because of some git errors), I figured out a cleaner solution:
New 3. Now, we will use a git-subtree technique to push the build or output content to the gh-pages branch. You will need to run the following lines every time you want to update your site/blog!
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix output -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment