I just wanted to commit my changes to my local git, when i noticed that the Local Changes window was missing all the changes of the past 3 hours, and was just showing the following error message:
I haven't changed anything in my setup compared to the last 50 commits. I had this problem 2 months ago already and wasn't able to fix it back then either, but I also noticed it fairly quickly and just pulled again and repeated the changes, but this time its not that easy.
How can I fix this problem, and restore the detected changes again, to stage them for a commit? In the files the changes are still there, but whatever I do, it's not getting tracked anymore.
EDIT: Hitting the refresh button in the local changes window in IntelliJ fixed it. Problem solved.

.git/filerefused to be open by git. Maybe try fix the permission of the file for your current user?