[Git:commit错误] Fatal: cannot do a partial commit during a merge
注:本文出自博主 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提交代码时有部分代码没有做好提交的准备。
解决方法
- 全部提交。
git commit -a
- 部分提交,可以通过添加 -i 参数。
git commit file -i -m "merge"
然后解决一下冲突就可以提交了!
[Git:commit错误] Fatal: cannot do a partial commit during a merge的更多相关文章
- 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 : ...
- git clone错误 fatal: early EOF fatal: index-pack failed
最后用ssh的方式解决了,不用http https://blog.csdn.net/fastjack/article/details/79757520 用了以下的方法还是不行 今天想 clone 一下 ...
- git commit 出现 changes not staged for commit 错误
git commit 出现 changes not staged for commit 错误 修复: 参考:http://stackoverflow.com/questions/8488887/git ...
- git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists.
git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists. 具体出错代码如下: 具体原因不详,在stackoverf ...
- (转)git常见错误
如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fatal: remote ...
- git常见错误
一.如果输: $ git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fat ...
- Git常见错误处理
如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fatal: remo ...
- git常见错误及解决方案总结
git常见错误及解决方案总结 使用git在本地创建一个项目的过程 $ makdir ~/hello-world //创建一个项目hello- ...
- git clone错误
git clone错误 Initialized empty Git repository in ***/.git/ error: The requested URL returned error: 4 ...
随机推荐
- linux 命令全名
su:Swith user 切换用户,切换到root用户cat: Concatenate 串联uname: Unix name 系统名称df: Disk free 空余硬盘du: Disk u ...
- 类加载之 <clinit>() 和 <init>()
前序文章:深入理解Java类加载 <clinit>() 与 <init>() 区别 一.<clinit>() Java 类加载的初始化过程中,编译器按语句在源文件中 ...
- 看片微信号+薇myy9199买片微信号+myy9199绝对靠谱号
最新看片卖片微信号+myy9199,2020最新有效靠谱号,诚信有效,死链包换,2019年11月,我决定学习计算机编程,以java语言为主.我就读于传统工科专业,没怎么接触过计算机相关概念与课程,我知 ...
- Linux防火墙之iptables扩展处理动作
前文我们讲了iptables的扩展匹配,一些常用的扩展模块以及它的专有选项的使用和说明,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/12285152.html ...
- 二、通过工厂方法来配置bean
调用静态工厂方法创建 Bean是将对象创建的过程封装到静态方法中. 当客户端需要对象时, 只需要简单地调用静态方法, 而不同关心创建对象的细节. 要声明通过静态方法创建的 Bean, 需要在 Bean ...
- Codeforces_842
A.枚举一个区间,判断是否有数符合. #include<bits/stdc++.h> using namespace std; long long l,r,x,y,k; int main( ...
- LeetCode#26 | Remove Duplicates from Sorted Array 删除有序数组中的重复元素
一.题目 Description Given a sorted array, remove the duplicates in-place such that each element appear ...
- python学习(1)python的基本概念
1.python是世界上最流行的程序语言之一,用途广泛. 2.python是解释型语言,与C++编译类语言相比,python扩展性强,简单易上手.但是缺点也很明显,执行速度慢. 3.python定义中 ...
- 使用sass语法生成自己的css的样式库
前言 先说一下 sass 和 scss的区别 sass 是一种缩进语法(即没有花括号和分号,只使用换行 缩进的方式去区别子元素,PS:这是我个人的理解) scss 是css-like语法 (它的语法 ...
- Angular组件通信
一. 组件间通信(组件间不能互相调用,公共方法放在服务中) (目前项目采用将公共方法直接写在ts文件中没使用服务) ng g service services/服务名 App.module.ts{ 引 ...