Git rebase、pull、push 出现 conflict 后不能merge的解决方法

我们使用 Git rebase 、pull 和 push的时候,经常会遇到冲突,这个时候我们会去merge:

$ git rebase master

出现冲突:

$ git mergetool -t opendiff

然后使用 opendiff 对 冲突的地方进行手动 merge。


但是,今天我遇见了不能merge的情况,问题如下:

$ git mergetool -t opendiff
$ no files need merging

提示我没有文件需要merging,在google上查到了解决方法,一般有两种:


第一种:

$git config --global core.trustctime false

以上一句话的解释是:

If false, the ctime differences between the index and the working copy are ignored; useful when the inode change time is regularly modified by something outside Git (file system crawlers and some backup systems). and core.trustctime is true by default.

所以,直接设置成false,没有什么大碍,只要代码的内容一致就没有问题。


第二种:

$git rebase --skip

可以直接 skip,因为没有文件需要merging,说明冲突不是在文件的内容上。


问题解决。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值