由于某些原因,最近每次拉动并发生合并冲突时,运行git mergetool报告"没有文件需要合并":
$ git pull
First, rewinding head to replay your work on top of it...
Applying: replaced home button with Cancel
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
Classes/Controllers/HomeController.m
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0002 moved rollback into cancel …Run Code Online (Sandbox Code Playgroud) 我在分支机构中进行了一些更改new.
我结账了master.
当我尝试合并时:
$ git merge new
Auto-merging js/site.js
CONFLICT (content): Merge conflict in js/site.js
Automatic merge failed; fix conflicts and then commit the result.
Run Code Online (Sandbox Code Playgroud)
所以我安装了kdiff3并配置了我的配置文件,当我尝试使用mergetools时,我得到了:
$ git mergetool kdiff3
No files need merging
Run Code Online (Sandbox Code Playgroud)
我跑了一个差异,它输出了这个:
diff --cc js/site.js
index 8c17d62,7955b13..0000000
--- a/js/site.js
+++ b/js/site.js
@@@ -72,4 -81,18 +81,22 @@@ function doSmallScreen()
$(document).ready(function () {
calculateScreen();
- });
++<<<<<<< HEAD
++});
++=======
+ $(window).resize(function () {
+ delay(function () {
+ calculateScreen();
+ }, 500);
+ }); …Run Code Online (Sandbox Code Playgroud)