1.在使用git對源代碼進行push到github時,出現了好幾回這種狀況:git
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。github
2. hexo安裝沒問題,但不能訪問 localhost:4000,是由於電腦端口(4000)被(福昕閱讀器)佔用。使用以下命令行: hexo s -p 5000 將端口換成5000便可。hexo
3. hexo+github pages搭建的我的網站算是完成了,但問題仍是很大,下午換主題失敗,我的網站該放一放了。忙完更重要的事再好好研究。fetch