zoukankan      html  css  js  c++  java
  • 关于hexo+github pages建立博客

    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搭建的个人网站算是完成了,但问题还是很大,下午换主题失败,个人网站该放一放了。忙完更重要的事再好好研究。

  • 相关阅读:
    242. Valid Anagram
    [wikioi]关押罪犯
    [wikioi]数的划分
    [wikioi]能量项链
    [wikioi]线段覆盖 2
    [wikioi]乌龟棋
    POJ1011 Sticks
    *[leetcode]Word Break II
    [leetcode]Word Break
    《高性能网站建设指南》笔记
  • 原文地址:https://www.cnblogs.com/wangmengjun/p/7077184.html
Copyright © 2011-2022 走看看