Created
January 26, 2017 15:22
-
-
Save phyng/b449c759f1e530dbd075fdd2ad65a261 to your computer and use it in GitHub Desktop.
Revisions
-
phyng created this gist
Jan 26, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ # subfolder: dist # ref: https://gist.github.com/cobyism/4730490 # save the last commit id old_commit=$(git log -1 --pretty=format:"%h") # force add dist and commit git add dist -f && git commit -m "build: build prod" # force push subtree git push origin `git subtree split --prefix dist master`:gh-pages --force # reset to old_commit git reset "${old_commit}"