CLion modifies/changes the source files of the project


I face a quit peculiar problem.

I am using CLion from a Windows 10 machine. I am working on a project hosted on a Linux server. I mount (via afs) the remote working directory and open it with CLion (in Windows).

The problem is that suddenly a lot of files tracked by git are in a modified state although I didn't changed them. When I git diff on them it seems that all lines are modified in the file (- a line and then + the same line).

My guess is that ^M (the windows specific line break) is appended to all lines in the files by CLion.

Can somebody tell me how can I prevent CLion changing the files?

PS: if I "git checkout -f"  and wait for 10 seconds, then the files are again modified without me doing anything.

Thank you for your help.


1 comment

I can confirm that it is the ^M problem. I made sure that the Line separator everywhere is LF instead of CRLF but still the IDE kept changing the line separators.

After removing .idea and restarting the IDE while at the same time disabling git support I managed to prevent this problem for now.



Please sign in to leave a comment.