我在分支中提交了一些更改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.
所以我安装了 kdiff3 并配置了我的配置文件,当我尝试使用 mergetools 时,我得到了:
$ git mergetool kdiff3
No files need merging
我跑了一个差异,它输出了这个:
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);
+ });
+ });
+
+
+ var delay = (function () {
+ var timer = 0;
+ return function (callback, ms) {
+ clearTimeout(timer);
+ timer = setTimeout(callback, ms);
+ };
-})();
++})();
++>>>>>>> new
我对如何解决这个问题感到困惑,我想以最简单的方式解决这个问题,我真的不在乎我是否会从新分支中丢失信息,但我想了解出了什么问题以及为什么我不能t 使用合并工具。
对我来说,我有合并冲突但没有文件需要合并,这似乎很奇怪。