1

I'm starting to work with EGit. I've created an initial repository and I've done some changes and commits to get Version2. Then I came back to the initial version and changed some files and I committed the changes. I did a merge with some conflicts and this is the resulting tree:

enter image description here

The strange thing is that when I checkout from one branch to another some files appear unstaged (">"). To fix this I reset the changes, but when I checkout to another branch it happens again.

If I close Eclipse and I open the repository in Git Extensions I can checkout different branches without any problem.

Sometimes when I want to reset the changes from Eclipse to remove this "ghost changes" I can't do it because the conflict dialog is reopen again and again when I press the reset button.

EDIT: I post the Diff o a file.

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>

It's seems that the differences are when there is a CRLF.

Alpha75
  • 1,523
  • 1
  • 19
  • 37
  • 1
    The ">" marker does not mean "unchanged", it means changed. What version of EGit are you using? Do you use the "core.autocrlf" setting? What is the diff that is shown for the changed files (open the Git Staging view and double-click on changes)? – robinst May 19 '13 at 15:09
  • Yes, I meant "unstaged" instead "unchanged". I use Eclipse Juno 4.2 with Egit 2.2. There aren't difference when I compare files. The first line it's highlighted but they are the same. The core.autocrlf it's true. – Alpha75 May 19 '13 at 15:44

1 Answers1

1

If core.autocrlf is set to true, I would recommend (as I usually do) to set it to false, and limit end-of-line conversion to core.eol directives in .gitattributes files.

Once core.autocrlf is set to false, you can then check if going from one branch to another still makes those "ghost changes".

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283