git 常见错误总结

佐手、 提交于 2019-11-30 04:27:25
  1. git push 时,报错如下
To https://g*********.git
 ! [rejected]            stage -> stage (fetch first)
error: failed to push some refs to 'https:/**.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.

可以输入这个指令

git reset --hard origin/stage
然后在执行
git pull
就可成功
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!