diff options
author | Jakub Z <jakzale@gmail.com> | 2016-09-06 18:53:05 +0100 |
---|---|---|
committer | Jakub Z <jakzale@gmail.com> | 2016-09-06 18:53:05 +0100 |
commit | f7047b5bdf45d800addf9c753385d3848e22c8c7 (patch) | |
tree | d6f5e24bc4011b79d32bd76a896c8b71dbd5a333 | |
parent | 2fff87b9f520c67e79763307a70f8ceb88dd45b2 (diff) | |
download | hakyll-f7047b5bdf45d800addf9c753385d3848e22c8c7.tar.gz |
Update git fetch and fix rsync for stack
-rw-r--r-- | web/tutorials/github-pages-tutorial.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/web/tutorials/github-pages-tutorial.md b/web/tutorials/github-pages-tutorial.md index 67410bd..7681353 100644 --- a/web/tutorials/github-pages-tutorial.md +++ b/web/tutorials/github-pages-tutorial.md @@ -86,7 +86,7 @@ stack exec myblog build Update the local list of remote branches to ensure we're able to checkout the branch we want in the next step. ``` -git fetch -all +git fetch --all ``` Switch to the `master` branch. @@ -142,7 +142,7 @@ stack exec myblog clean stack exec myblog build # Get previous files -git fetch -all +git fetch --all git checkout -b master --track origin/master # Overwrite existing files with new files @@ -168,7 +168,13 @@ git stash pop Earlier it was mentioned a flaw is that deleted files will persist in the published site until deleted manually. This is easily overcome by using `rsync` instead of `cp`. ``` -rsync -a --filter='P _site/' --filter='P _cache/' --filter='P .git/' --filter='P .gitignore' --delete-excluded _site/ . +rsync -a --filter='P _site/' \ + --filter='P _cache/' \ + --filter='P .git/' \ + --filter='P .gitignore' \ + --filter='P .stack-work' \ + --delete-excluded \ + _site/ . ``` The only drawback this approach has is the requirement that *every* file in your site "go through" Hakyll. Fortunately, in many cases this is not an issue. |