使用soureTree推送代码报错

img

使用soureTree推送代码报错
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin master:master
Pushing to https://gitee.com/ideploy/ideal-his.git
To https://gitee.com/ideploy/ideal-his.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/ideploy/ideal-his.git'

hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
网上说让使用命令pull但是也不生效,渴望大手子能提供解决方案

强推,即利用强覆盖方式用你本地的代码替代git仓库内的内容,如果远程仓库是刚建的,没有代码,可以这样操作,尽量避免这种操作方法。
git push -f
https://blog.csdn.net/m0_37806112/article/details/82289606建议参考一下
如果还是不行,可以把库里面的内容清空一下,然后重新克隆然后push,一般建议使用命令行操作

没有代码强制覆盖,有代码的话,你备份下本地代码,然后重新拉下,应该是本地代码的提交版本低于远程的,然后就会提示你