#直接转兄弟的链接
##我在创建中遇到的问题
主要问题是输入命令rake deploy 的时候报下面的错误
## Pushing generated _deploy website
To git@github.com:NPOpenSource/npopensource.github.com.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:NPOpenSource/ npopensource.github.com.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
这个原因的产生是因为在目录 /octopress/_deploy/ 下面的文件和远程有冲突导致的。
解决办法是 在 /octopress 输入命令git pull origin master
cd _deploy/
进入该文件夹 git remote -v
查看当前文件下 有冲突的文件 将有冲突的文件解决掉就行了 并提交
保证 git status 结果为
On branch master
nothing to commit, working directory clean
之后cd .. 退出到 /octopress
查看 git remote -v 将修改的文件也提交
保证 git status 结果为
On branch master
nothing to commit, working directory clean
最后再次运行 rake deploy 就行了。
个性化设置参考链接