用Github搭建博客时,实现在线预览,无法将本地远程到Github仓库.
已在在GitHub上创建一个仓库repository,仓库名称为xuqianzheng.github.io
$ git add
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
$ git commit -m "first post"
On branch master
Initial commit
Untracked files:
.gitignore
_config.yml
package.json
scaffolds/
source/
themes/
nothing added to commit but untracked files present
$ git remote add origin https://github.com/xuqianzheng/xuqianzheng.github.io.git
fatal: remote origin already exists.
$ git push origin gh-pages
error: src refspec gh-pages does not match any.
error: failed to push some refs to
添加需要指定文件,如:
另: 用hexo写博客,并不是将源文件夹推上github。你应该用 hexo d 将public 文件推上 username.github.io的master分支。详细内容请自搜教程。