Community
Participate
Working Groups
Created attachment 284353 [details] Ignore changes does not work When there are issues when checking out a branch, the "Ignore changes" button does not work.
Which EGit version? Check the line endings. What are the line endings in the git index? What are the line endings on disk? What are the settings (core.eautocrlf/core.eol, .gitattributes) for this file? I remember having had something similar a while back with a file that used mixed line endings. (Some lines CR/LF, some LF.) Whatever I did, the file always showed up as modified until I corrected the line endings.
(In reply to Thomas Wolf from comment #1) > Which EGit version? Eclipse EGit 5.9.0.202009080501-r org.eclipse.egit > > I remember having had something similar a while back with a file that used > mixed line endings. (Some lines CR/LF, some LF.) Whatever I did, the file > always showed up as modified until I corrected the line endings. Yes this might be the same category. Eclipse/EGit think this file is not coded UTF-8 while in fact it is. I have to re-save it and commit to both branches before I can switch back an forth. If you plan on looking at this, I can try to create a minimal project that exposes this. Let me know what you want to do.
Check the encoding settings in Eclipse. Probably those say it was ISO-8859-1. *.properties files normally are not UTF-8. (Java Properties assume ISO-8859-1; and yes, Spring for instance has machinery to read UTF-8 properties files.) Hmmm... I remember having looked at something similar not long ago... ah yes: that was bug 566097. If you could provide a little demo git repo on Github containing an Eclipse project that shows that problem, that would be helpful. Would save me having to figure out which combination of settings exactly cause trouble.
It can take a while before I can work on this.