Page 1 of 1

File keeping listed as changed

Posted: Mon Apr 23, 2018 2:58 pm
by spider910
Since some weeks ago, I had a very recurring problem: a file constantly is being listed as modified (completely modified, in fact), no matter what I tries. I don't touch it, but even stashing, resetting, uninstalling GitHub and all repository files, etc, the file remais as modified. The file in question is CustomTabbedPaneUI.java. There is something I can do to get rid of this problem? Sometimes it delays my merges, because I can't stash/cancel it.

It appears to be a line ending problem, but I'm really not sure.

Re: File keeping listed as changed

Posted: Mon Apr 23, 2018 6:52 pm
by SubJunk
Ah yeah I've seen this, you can change the line ending setting in Git to make it play nice with our line endings

Re: File keeping listed as changed

Posted: Mon Apr 23, 2018 9:25 pm
by Nadahar
I have configured my Git to only alter line endings at commits, not at check-out ("core.autocrlf" = "input"). This has worked well for me on Windows since it makes sure no conversion takes place on checkout and I don't get this problem. At the same time my commits use Unix-style (LF only) line-endings, which is the only reasonable thing to do.

I wish Windows-style line endings (CR + LF) would go down in history as a big mistake and be forgotten about. Apple has already abandoned "their" line-endings (CR) and now use (LF) as well.

See https://stackoverflow.com/questions/104 ... g-settings