Skip to content

Instantly share code, notes, and snippets.

@JPGITHUB1519
Forked from tduarte/publish-ghpages.md
Created March 17, 2021 16:27
Show Gist options
  • Save JPGITHUB1519/7d3ad328c6e2fb13412b5110e498a327 to your computer and use it in GitHub Desktop.
Save JPGITHUB1519/7d3ad328c6e2fb13412b5110e498a327 to your computer and use it in GitHub Desktop.

Revisions

  1. @tduarte tduarte revised this gist Oct 13, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion publish-ghpages.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    ```
    git checkout master # you can avoid this line if you are in master...
    git subtree split --prefix dist -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
    git branch -D gh-pages # delete the local gh-pages because you will need it: ref
    ```
  2. @tduarte tduarte created this gist Oct 13, 2016.
    4 changes: 4 additions & 0 deletions publish-ghpages.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    git checkout master # you can avoid this line if you are in master...
    git subtree split --prefix dist -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