首页 > 其他 > 详细

关于hexo+github pages建立博客

时间:2017-06-25 21:14:21      阅读:248      评论:0      收藏:0      [点我收藏+]

1.在使用git对源代码进行push到github时,出现了好几次这种情况:

1 $ git push -u origin master
2 To github.com:wangmengjun142857/wangmengjun142857.github.io.git
3  ! [rejected]        master -> master (fetch first)
4 error: failed to push some refs to git@github.com:wangmengjun142857/wangmengjun142857.github.io.git
5 hint: Updates were rejected because the remote contains work that you do
6 hint: not have locally. This is usually caused by another repository pushing
7 hint: to the same ref. You may want to first integrate the remote changes
8 hint: (e.g., git pull ...) before pushing again.
9 hint: See the Note about fast-forwards in git push --help for details.

  出现错误的主要原因是github中的README.md文件不在本地代码目录中。使用如下命令即可进行代码合并:git pull --rebase origin master,执行上面代码后可以看到本地代码库中多了README.md文件,此时再执行语句 git push -u origin master即可完成代码上传到github。

2. hexo安装没问题,但不能访问 localhost:4000,是因为电脑端口(4000)被(福昕阅读器)占用。使用如下命令行: hexo s -p 5000  将端口换成5000即可。

3. hexo+github pages搭建的个人网站算是完成了,但问题还是很大,下午换主题失败,个人网站该放一放了。忙完更重要的事再好好研究。

关于hexo+github pages建立博客

原文:http://www.cnblogs.com/wangmengjun/p/7077184.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!