注:本文出自博主 Chloneda:个人博客 | 博客园 | Github | Gitee | 知乎

问题场景

今天进行Spring Boot版本升级,解决冲突后进行代码文件提交时出现这个错误。

上午11:56 Commit failed with error
0 files committed, 5 files failed to commit: 升级Spring Boot版本,解决代码冲突。
cannot do a partial commit during a merge.

其中最后一行的意思是不能部分提交代码。这是因为git提交代码时有部分代码没有做好提交的准备。

解决方法

  1. 全部提交。
git commit -a
  1. 部分提交,可以通过添加 -i 参数。
git commit file -i -m "merge"

然后解决一下冲突就可以提交了!

[Git:commit错误] Fatal: cannot do a partial commit during a merge的更多相关文章

  1. Git error on commit after merge - fatal: cannot do a partial commit during a merge

    Git error on commit after merge - fatal: cannot do a partial commit during a merge this answer is : ...

  2. git clone错误 fatal: early EOF fatal: index-pack failed

    最后用ssh的方式解决了,不用http https://blog.csdn.net/fastjack/article/details/79757520 用了以下的方法还是不行 今天想 clone 一下 ...

  3. git commit 出现 changes not staged for commit 错误

    git commit 出现 changes not staged for commit 错误 修复: 参考:http://stackoverflow.com/questions/8488887/git ...

  4. git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists.

    git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists. 具体出错代码如下: 具体原因不详,在stackoverf ...

  5. (转)git常见错误

    如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fatal: remote ...

  6. git常见错误

    一.如果输: $ git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git         提示出错信息:fat ...

  7. Git常见错误处理

      如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git  提示出错信息:fatal: remo ...

  8. git常见错误及解决方案总结

    git常见错误及解决方案总结 使用git在本地创建一个项目的过程  $ makdir ~/hello-world                              //创建一个项目hello- ...

  9. git clone错误

    git clone错误 Initialized empty Git repository in ***/.git/ error: The requested URL returned error: 4 ...

随机推荐

  1. 整合spring-data-redis以及redisTemplate的使用

    一.导入依赖配置 <dependency> <groupId>redis.clients</groupId> <artifactId>jedis< ...

  2. springIOC源码接口分析(五):ListableBeanFactory

    一 继承关系 该接口是对BeanFactory的扩展,允许预加载bean定义的BeanFactory可以实现此接口 其目的在于使实现它的BeanFactory能够枚举所有的Bean 该接口不支持分层结 ...

  3. 推荐一本学习Groovy的书籍Groovy程序设计!

    有朋友公司在用groovy开发,于是推荐我学习一下,搜到了这本书: 花了一个月时间读完了这本书!写的很棒,几乎没有废话,全书都是很重要的知识点和很好的讲解,确实像封面说的那样,使用的好可以提高开发效率 ...

  4. idea maven 动态打包指定环境

    jar pom.xml <!-- 指定文件id --> <profiles> <profile> <id>alpha</id> <pr ...

  5. CentOS 7 上安装 Django 2.2.4,解决报错:No module named ‘_sqlite3′

    1.首先下载最新版的sqlite :https://www.sqlite.org/download.html 下载源码包: 配置和编译方法如下: ./configure --prefix=/usr/l ...

  6. koa中间执行机制

    start 基于 koa 2.11 按以下流程分析: const Koa = require('koa'); const app = new Koa(); const one = (ctx, next ...

  7. 仅主机、NAT、桥接模式

    三种模式区别: 桥接模式 :通过主机映射一个ip给虚拟机,只要主机可以访问外网.虚拟机也可以访问,两机可以相互通信. NAT模式:主机和虚拟机在同一个地址,原则上两者不能相互通信,但是通过修改NAT配 ...

  8. @ComponentScan注解,basePackages参数通配符

    @ComponentScan(basePackages = "com.ofo.test")当basePackages的直使用通配符,使用**,不能使用*.引用:https://bl ...

  9. [python之路]变量和字符编码

    变量和字符编码 #变量##声明变量```#_*_coding:utf-8_*_ name = "Tom"```上述代码声明了一个变量,变量名为: name,变量name的值为:&q ...

  10. Loj 6002 最小路径覆盖(最大流)

    题意: 求不相交的最小路径覆盖 思路: 连边跑二分图,匹配一条边相当于缩了一条边,答案为n-maxflow 如果是求可以相交的最小路径覆盖的话,先用Floyd跑出可达矩阵,然后所有可达的点连边跑二分图 ...