- 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
就可成功
来源:https://blog.csdn.net/hw120219/article/details/101073831