villasenor
villasenor

Reputation: 107

IntelliJ Making Dirty Files in Git

I have a weird problem. Randomly, IntelliJ seems to be "modifying" some of my runConfigurations with bogus changes.

Git Diff:

modified: .idea/runConfigurations/Build_and_Deploy.xml
────────────────────────────────────────────────────────────────────────────────────────
@ Build_and_Deploy.xml:15 @
      <option name="Make" enabled="false" />
    </method>
  </configuration>
-</component>
+</component>

Looks like it removed </component> and then re-added it? I just don't understand why the file is dirty in git now, and why that would have happened.

Anyone have any idea?

This happens on a larger basis as well with other things. Like this bogus change:

-    <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/main/build/remote/build.sh" />
+    <option name="SCRIPT_NAME" value="$PROJECT_DIR$$PROJECT_DIR$/../main/build/remote/build.sh" />

Upvotes: 0

Views: 207

Answers (3)

Dmitrii Smirnov
Dmitrii Smirnov

Reputation: 7538

There is similar issue reported for IntelliJ, see https://youtrack.jetbrains.com/issue/IDEA-91607

Upvotes: 1

Code-Apprentice
Code-Apprentice

Reputation: 83527

Most likely this is a whitespace issue. If you open the XML file in IntelliJ, the left hand side will be color coded for different kinds of changes. By default, these are:

  • Green for additions
  • Grey for deletions
  • Blue for changes
  • Brown for whitespace-only changes

If you see a brown margin on the left, then the line only differs by whitespace.

Upvotes: 0

phd
phd

Reputation: 94483

Seems it adds/changes/removes end-of-line character.

Upvotes: 1

Related Questions