当前位置: 首页 > news >正文

git 上传代码时报错

在上传代码时,显示无法上传

PS E:\JavaWeb\vue3-project> git push
To https://gitee.com/evening-breeze-2003/vue3.git! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/evening-breeze-2003/vue3.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.

提示告诉我们文件版本冲突,我们使用 git pull 合并一下远程仓库的版本和本地的版本,git pull

如果 git pull 拉取失败,可能会提示你是哪些文件有问题,不能上传,或者有冲突

PS E:\JavaWeb\vue3-project> git pull
error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.

我们根据提示,需要我们修改或者删除需要提交的某些文件

我们显示一下所有文件的状态:git status,可以看到 README.md 文件冲突了

我们将这两个文件的提交从 commit 之中删除

然后我们再次拉取,就可以发现拉取成功了

这次我们再进行 git push 操作就不会报错了

最后成功提交代码:

http://www.lryc.cn/news/495731.html

相关文章:

  • 判断1456789876541是否为素数,是输出“是素数“,不是则输出“不是素数“
  • Flutter:封装发送验证码组件,注册页使用获取验证码并传递控制器和验证码类型
  • 亚马逊IP关联是什么?
  • Electron + vue3 打包之后不能跳转路由
  • docker安装clickhouse副本集群
  • vue超过三行显示省略号和查看更多按钮
  • 【软考速通笔记】系统架构设计师⑤——软件工程基础知识
  • Qt 详解QRubberBand
  • HTB:Love[WriteUP]
  • 【RabbitMQ 消息列队测试之:调试技巧】
  • Ubuntu FTP服务器的权限设置
  • @Pattern (用于校验字符串是否符合特定正则表达式)
  • 5G学习笔记之随机接入
  • webGL入门教程_03GLSL、OpenGL、WebGL 定义及关系
  • git基本操作说明
  • 微知-git如何添加空目录的几种方式?(.gitkeep, githook, gitconfig)
  • MySQL 数据库学习教程一:开启数据库探索之旅
  • Vue+Elementui el-tree树只能选择子节点并且支持检索
  • Lumos学习王佩丰Excel第十八讲:LOOKUP函数与数组
  • Git的基本使用操作
  • 【C语言】结构体嵌套
  • PDF view | Chrome PDF Viewer |Chromium PDF Viewer等指纹修改
  • maxun爬虫工具docker搭建
  • JAVAWeb之javascript学习
  • vue3中是如何实现双向数据绑定的
  • JavaScript事件机制详解
  • k8s运行运行pod报错超出文件描述符表限制
  • vue 2 父组件根据注册事件,控制相关按钮显隐
  • 22智能 图
  • Springfox、Swagger 和 Springdoc