Luffy船长 2022-08-27 11:10 采纳率: 50%
浏览 73

使用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但是也不生效,渴望大手子能提供解决方案

  • 写回答

2条回答 默认 最新

  • Fang GL 全栈领域新星创作者 2022-08-27 17:18
    关注

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

    评论 编辑记录

报告相同问题?

问题事件

  • 创建了问题 8月27日

悬赏问题

  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛