为什么我用git gui pull总是失败
Pushing to git@git.oschina.net:summving/Python-Study-Note---2013.git
To git@git.oschina.net:summving/Python-Study-Note---2013.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@git.oschina.net:summving/Python-Study-Note---2013.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 merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
To git@git.oschina.net:summving/Python-Study-Note---2013.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@git.oschina.net:summving/Python-Study-Note---2013.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 merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
出现这样的情况。之前成功推送过一次的,现在不知道怎么了,求解决方法。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
解释的已经很清楚了。因为远程仓库比你的本地库更新,所以你得先 pull 下,再 push 就 ok 了。
没有设定远程跟踪分支的话 你要使用这个命令 git pull origin master
没有设定远程跟踪分支的话 你要使用这个命令 git pull origin master
git pull --rebase 试试
git pull --rebase 试试
git pull --rebase 试试
解释的已经很清楚了。因为远程仓库比你的本地库更新,所以你得先 pull 下,再 push 就 ok 了。
你需要先git pull
@王振威
@tsl0922
解释的已经很清楚了。因为远程仓库比你的本地库更新,所以你得先 pull 下,再 push 就 ok 了。