Last active
January 6, 2016 05:28
-
-
Save frasertweedale/c80df04bce621d10d6dc to your computer and use it in GitHub Desktop.
git: commit hakyll compiled site to gh-pages branch
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 characters
| export GIT_INDEX_FILE=$PWD/.git/index-deploy | |
| export GIT_WORK_TREE=$PWD/_site | |
| REF=refs/heads/gh-pages | |
| git read-tree "$REF" | |
| git add --all --intent-to-add | |
| git diff --quiet && exit | |
| git add --all | |
| TREE=$(git write-tree) | |
| COMMIT=$(git commit-tree "$TREE" -p "$REF" -m "snapshot $(date '+%y-%m-%d %H:%M')") | |
| git update-ref "$REF" "$COMMIT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment