$ git add . #将当前目录所有文件添加到git暂存区
$ git commit -m "my first commit" #提交并备注提交信息
git remote add origin https://git.oschina.net/zk15519092013/IonicCss.git //将本地仓库同步至地址为https://git.oschina.net/zk15519092013/IonicCss.git(改地址未git仓库的HTTPS地址,也可直接更换为SSH地址)的git仓库
$ git push -u origin master
问题
如何解决failed to push some refs to git
出现错误的主要原因是github中的README.md文件不在本地代码目录中
可以通过如下命令进行代码合并【注:pull=fetch+merge]
git pull --rebase origin master
此时再执行语句 git push -u origin master即可完成代码上传到github