ブランチにいくつかの変更をコミットしました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 を実行したところ、次のように出力されました。
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
これを解決する方法について混乱しています。これを可能な限り簡単な方法で解決したいのですが、ブランチ new から情報を失ってもあまり気にしませんが、何がうまくいかなかったのか、なぜ解決できないのかを理解したいのです。マージ ツールを使用しないでください。
マージの競合が発生しているのに、ファイルをマージする必要がないのは奇妙に思えます。