**
A. error:src refspec master does not match any
**
这个问题,我之前也遇到过,这次又遇到了只是时间间隔比较长了,为了防止以后再遇到类似问题,还是把这个方法简单记录在此。
原因分析:
目录中没有文件,空目录是无法提交的。
解决方案:
添加文件后进行提交。
git add .
git commit -m ‘init’
git push origin master
**
B. 本地down项目,修改提交
**
a. 在github上创建项目
b. 使用git clone https://github.com/xxxxxxx/xxxxx.git克隆到本地
c. 编辑项目
d. git add . (将改动添加到暂存区)
e. git commit -m “提交说明”
f. git push origin master 将本地更改推送到远程master分支。
这样就完成了向远程仓库的推送。