on master help sign in
Update git fetch and fix rsync for stack
f7047b5Jakub Z
web/tutorials/github-pages-tutorial.md+9−3
@@ -86,7 +86,7 @@ stack exec myblog build
86Update the local list of remote branches to ensure we're able to checkout the branch we want in the next step.
86Update the local list of remote branches to ensure we're able to checkout the branch we want in the next step.
87
87
88```
88```
89−git fetch -all
89+git fetch --all
90```
90```
91
91
92Switch to the `master` branch.
92Switch to the `master` branch.
@@ -142,7 +142,7 @@ stack exec myblog clean
142stack exec myblog build
142stack exec myblog build
143
143
144# Get previous files
144# Get previous files
145−git fetch -all
145+git fetch --all
146git checkout -b master --track origin/master
146git checkout -b master --track origin/master
147
147
148# Overwrite existing files with new files
148# Overwrite existing files with new files
@@ -168,7 +168,13 @@ git stash pop
168Earlier 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`.
168Earlier 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`.
169
169
170```
170```
171−rsync -a --filter='P _site/' --filter='P _cache/' --filter='P .git/' --filter='P .gitignore' --delete-excluded _site/ .
171+rsync -a --filter='P _site/' \
172+ --filter='P _cache/' \
173+ --filter='P .git/' \
174+ --filter='P .gitignore' \
175+ --filter='P .stack-work' \
176+ --delete-excluded \
177+ _site/ .
172```
178```
173
179
174The 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.
180The 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.