相关疑难解决方法(0)

git mergetool报告"没有文件需要合并"

由于某些原因,最近每次拉动并发生合并冲突时,运行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)

git git-merge

38
推荐指数
4
解决办法
2万
查看次数

git告诉我,我合并了冲突,但也告诉我没有文件需要合并

我在分支机构中进行了一些更改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)

git mergetool git-merge kdiff3 branching-and-merging

11
推荐指数
3
解决办法
3648
查看次数