Octopress将错误推送到GitHub

rks*_*ksh 16 ruby github jekyll

我正在尝试将octopress推到github页面,到目前为止一切都运行良好但是当我在显示octopress文件后执行rake deploy命令时出现以下错误

To git@github.com:rukshn/rukshn.github.io.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:rukshn/rukshn.github.io.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Run Code Online (Sandbox Code Playgroud)

有什么问题?

tam*_*use 31

由于这是主分支,即运行生成的页面的分支,因此需要进入_deploy目录,然后执行git pull origin master.不知何故,您的部署目录已经不同步.您是否有多个本地仓库来编写和部署?(在不同的机器上说...)如果你这样做,那么你应该始终确保同步你的各种回购中的来源.


sla*_*vik 12

cd _deploy
git reset --hard origin/master
cd ..
Run Code Online (Sandbox Code Playgroud)

然后再试一次

rake generate
rake deploy
Run Code Online (Sandbox Code Playgroud)


Ben*_*Hao 1

尝试:

git checkout source

rake gen_deploy