$ git push origin master
To https://git.oschina.net/arraylist7/MultiFileSelector.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://git.oschina.net/arraylist7/MultiFileSelector.git'
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.
这个是什么意思啊
<divclass="container"><divclass="linenumber1index0alt2">我用gitremotermorigin之后,在次addorigin,pushmaster也是这个错
试试添加-f参数进行强制推送谢谢加上-f就可以了。本地推送有冲突,先gitpull拉取最新代码,解决冲突,再gitpush我是直接在eclipse里面写的代码,写的差不多了,打算提交到git的。然后今天才在git上创建的项目。这样也会有冲突?你初始化的并不是一个空仓库,本地推送是-f即可,也可以gitfetch,gitmerge,下次初始化空仓库即可。
3Q,我加上-f就提交成功了。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。