error: failed to push some refs to 'git@github.com:xxxx/git-demo.git’解决方案
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:xxxx/git-demo.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 push --set-upstream origin master 依然报同样错误
解决方案
-
输入:**git pull --rebase origin master
**
-
最后输入:** git push -u origin master**
问题得以解决
https://blog.csdn.net/weixin_45912307/article/details/108603306