如果遇到下面问题:
error: failed to push some refs to '路径'
hint: Updates were rejected because the remote contains work that you do
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 pullg更新下来,如果你是第一次push,那就是你的远程中可能默认新建了README.md文件,这个文件你本地是没有的,解决方法就是删除它,再push一次。
//如果你想强制提交,添加-f
git push -f origin master