不要做什麼denbuzze表明上述!推動中的+(加號)使其悄悄地接受非快速更新。我發現困難的方式是,這可能會導致工作的懸而未決,導致工作流失。簡單地刪除加號使得這是一種更安全的方法。
push = refs/heads/master:refs/heads/gh-pages
push = refs/heads/master:refs/heads/master
現在不是導致強制更新,這將導致警告&拉建議
To https://github.com/someuser/repo.git
! [rejected] master -> gh-pages (fetch first)
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/someuser/repo.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Github現在允許從主分支中的主分支或'/ docs'驅動頁面。 https://github.com/blog/2228-simpler-github-pages-publishing – 2016-08-18 13:10:24