当我 fork 一个已经包含 gh-pages 分支的 repo 时,我的账户中是否会自动创建 Github Pages?
当我 fork 一个已经包含 gh-pages 分支的 repo 时,我的账户中是否会自动创建 Github Pages?
至少需要进行一次推送来触发页面构建,因此通过执行git push origin master
,我使页面重新构建。
gh-pages
分支。 - David Riccitelli一种优雅的方法:
git push -f origin gh-pages^:gh-pages
git push origin gh-pages:gh-pages
git push origin master
可能不太好,因为 master
上可能已经有了一些东西。上面的命令应该总是有效的,因为它只是简单地把远程分支来回移动。error: src refspec gh-pages does not match any.
但是在我看来,第一个命令已经足够了。 - asmaiergh-pages
分支吗?USERNAME.github.io
仓库是神奇的,会在master
上生成GH Pages。 - Ciro Santilli OurBigBook.comgit push -f origin HEAD^:gh-pages
已经足够了。 - asmaierMake any kind of git push
to the gh-pages
branch. As others have suggested, a trivial non-change you can make is:
git push -f origin origin/gh-pages^:gh-pages
git push origin origin/gh-pages:gh-pages
gh-pages
的HEAD,然后修复它。git push -f origin origin/gh-pages^:gh-pages
git push origin origin/gh-pages:gh-pages
这会触发发布者钩子两次,但您不必提交任何内容。
gh-pages
分支,但在确认之前,你需要等待 10 分钟,因为页面的创建存在一些延迟。 - Mark Longair