github本地文件Push到仓库

echo # bookshelf >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/ireneAi/bookshelf.git
git push -u origin master

错误提示:src refspec master does not match any

本地版本库为空, 空目录不能提交 (只进行了init, 没有add和commit)  

 

错误提示:error: failed to push some refs to

由于远程仓库中代码版本与本地不一致冲突导致的。

解决:

git pull

再自动merge或手动merge冲突

再次git push

或:

git pull --rebase origin master

如何直接在github上预览html网页效果

(在github上托管的项目, 经常会存放一些demo的html文件在里面)

我们直接点击的话只能看到html源代码, 

在源代码的路径前加上: http://htmlpreview.github.com/? 就可以了

 或打开:http://htmlpreview.github.io/在线生成

posted @ 2015-12-15 16:22  王麦曦  阅读(338)  评论(0编辑  收藏  举报