Skip to content

Commit 67c663e

Browse files
committed
Discard gh-pages commit history
No reason to keep the commit history for gh-pages. The docs can be rebuilt at any commit at any time. Keeping the history means `git log --graph --all` is cluttered with gh-pages commits. Even worse, they appear above the important commits because every commit to master is followed a few minutes later by a commit to gh-pages.
1 parent 53bf10a commit 67c663e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

deploy-docs.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ git init
1010
git config user.email '[email protected]'
1111
git config user.name 'FlashCat'
1212
git remote add upstream "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git"
13-
git fetch upstream gh-pages
14-
git reset upstream/gh-pages
1513

1614
touch .
1715

1816
git add -A .
19-
git commit -m "rebuild pages at ${rev}"
20-
git push -q upstream HEAD:gh-pages
17+
git commit -qm "rebuild pages at ${rev}"
18+
git push -q upstream HEAD:gh-pages --force

0 commit comments

Comments
 (0)