【问题标题】:Octopress update gh-pages branchOctopress 更新 gh-pages 分支
【发布时间】:2014-12-16 00:40:06
【问题描述】:

我已经在我的 github 帐户上设置了 Octopress。我有3个分支;源,主,gh-pages。当我添加新的博客文章时,会在本地生成,但不会在我的 github 帐户的 gh-pages 分支上更新。我试图提交,推入 gh-pages 分支,但我得到“没有提交,工作目录干净”的消息。

【问题讨论】:

    标签: github branch jekyll octopress


    【解决方案1】:

    编辑:我看了你的Rakefiledeploy_branch = "master" 必须是deploy_branch = "gh-pages"

    让我们解决这个问题

    # go to site root
    cd /your/folder
    
    # be sure to be on the source branch
    git checkout source
    
    # make a backup (Shit happens)
    cp -rp . ../save.alperunal
    
    # remove the gh-pages branch on github
    git push origin --delete gh-pages
    
    # setup the deploy folder on gh-pages
    rake setup_github_pages[git@github.com:jspduke/www.alperunal.com.git]
    
    # deploy your code
    rake gen_deploy
    

    好的,你现在正在推送gh-pages。现在一切都很好,您可以:

    • 删除备份rm -rf ../save.alperunal
    • 去 github,将你的 source 设为默认分支并删除 master

    【讨论】:

    • 我的远程来源看起来正确。检查 .git/config。还是有同样的问题。
    • 你有github仓库吗?
    猜你喜欢
    • 2021-08-01
    • 2013-07-18
    • 2011-06-12
    • 2015-12-13
    • 1970-01-01
    • 2018-02-02
    • 1970-01-01
    • 2019-09-16
    • 2013-09-01
    相关资源
    最近更新 更多