个人认为,这个报错的原因是因为远程repository和本地的repository有冲突造成的
错误翻译
提示:由于当前分支的尖端位于其远程对应的后面,因此更新被拒绝。 合并远程更改(例如’git pull’),然后再次推送。 有关详细信息,请参见“ git push --help”中的“关于fast-forwards的注意事项”。
解决方法
1,按照提示先用
git pull
之后再用git push
git pull origin master
git push origin master
2,先在主分支创建新的分支,然后再
push提交
git branch [name]
git push origin [name]