1

私はEGitを使い始めています。初期リポジトリを作成し、Version2 を取得するためにいくつかの変更とコミットを行いました。その後、初期バージョンに戻っていくつかのファイルを変更し、変更をコミットしました。私はいくつかの競合でマージを行いました。これは結果のツリーです:

ここに画像の説明を入力

奇妙なことに、あるブランチから別のブランチにチェックアウトすると、一部のファイルがステージングされていないように見えます (">")。これを修正するために変更をリセットしましたが、別のブランチにチェックアウトすると再び発生します。

Eclipse を閉じて、Git Extensions でリポジトリを開くと、問題なく別のブランチをチェックアウトできます。

この「ゴーストの変更」を削除するために Eclipse からの変更をリセットしたい場合、リセット ボタンを押すと競合ダイアログが何度も開かれるため、リセットできないことがあります。

編集: Diff oa ファイルを投稿します。

diff --git a/MyApp/res/values/styles.xml b/MyApp/res/values/styles.xml
index 79a39af..afe1d34 100644
--- a/MyApp/res/values/styles.xml
+++ b/MyApp/res/values/styles.xml
@@ -1,13 +1,13 @@
 <resources>

     <!--
-        Base application theme, dependent on API level. This theme is replaced
+        Base application theme, dependent on API level. This theme is replaced
         by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
     -->
     <style name="AppBaseTheme" parent="android:Theme.Light">
         <!--
-            Theme customizations available in newer API levels can go in
-            res/values-vXX/styles.xml, while customizations related to
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
             backward-compatibility can go here.
         -->
     </style>

違いはCRLFがある場合のようです。

4

1 に答える 1

1

core.autocrlfが true に設定されている場合は、(私が通常行っているように) false に設定し、ファイル内のcore.eolディレクティブ.gitattributesへの行末変換を制限することをお勧めします。

false に設定するとcore.autocrlf、あるブランチから別のブランチに移動しても、これらの「ゴースト変更」が行われるかどうかを確認できます。

于 2013-05-19T16:04:54.903 に答える