注:本文出自博主 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. nginx之文件配置

    nginx配置规则 nginx由受配置文件中指定的指令控制的模块组成 伪指令分为简单伪指令和块伪指令 简单的指令由名称和参数组成,这些名称和参数之间用空格分隔,并以分号(;)结尾 块指令的结构 与 简 ...

  2. CUDA学习(七)之使用CUDA内置API计时

    问题:对于使用GPU计算时,都想知道kernel函数运行所耗费的时间,使用CUDA内置的API可以方便准确的获得kernel运行时间. 在CPU上,可以使用clock()函数和GetTickCount ...

  3. openstack中的延迟删除

    glance镜像的延迟删除 在控制节点的glance-api.conf文件中设置延迟删除: # Turn on/off delayed delete delayed_delete = False # ...

  4. nginx配置文件的通用语法介绍

    nginx的配置文件是ascii文本文件. 比如http{  }这种的是指令块,include  mime.types: 这种是指令,include是指令,mime.types指令的参数,指令和参数之 ...

  5. top100tools

    Top 100 Tools for Learning 2013 2142 EmailShare Here are the Top 100 Tools for Learning 2013 –  the ...

  6. SQL Server 2012 安装完成后,无法通过 sa账号登录

    1.打开 SQL server  configuration manager 2.打开 SQLserver 网络配置 打开 SQLSERVER的协议 3.右击 TCP/IP协议,选择 IPALL ,在 ...

  7. webdriver的常用方法

    webdriver的常用方法 click():点击元素 clear():清除文本 send_keys(value):模拟按键输入 # -*- coding:utf-8 -*- from seleniu ...

  8. asp.net core 3.x 身份验证-3cookie身份验证原理

    概述 上两篇(asp.net core 3.x 身份验证-1涉及到的概念.asp.net core 3.x 身份验证-2启动阶段的配置)介绍了身份验证相关概念以及启动阶段的配置,本篇以cookie身份 ...

  9. CCF_ 201312-2_ISBN号码

    水. #include<cstdio>#include<string>#include<iostream>using namespace std; int main ...

  10. Go语言实现:【剑指offer】跳台阶

    该题目来源于牛客网<剑指offer>专题. 一只青蛙一次可以跳上1级台阶,也可以跳上2级.求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果). 1阶:共1种跳法: 2阶 ...