Done
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
为什么会出现这样的错误?:我是新建的项目在git上申请了一个仓库,由于第一次推送本地和远程仓库两者代码文件不同步,因此需要先pull,进行合并然后再进行push。
解决方法:
1、先使用pull命令:
git pull --rebase origin master
2、再使用push命令:
git push -u origin master