Lots of interference in git when syncing projects between computers. Advice?

I have a windows laptop and linux media server at home, and a mac laptop at work.

I sync my config/dotfiles using both git and nextcloud.

Usually I have no problems with syncing git repos over nextcloud. I set my NC ignore list to ignore node modules and let it sync the .git folder so that when I switch computers I don’t have to remember to pull down the latest copy of the git repo.

But lately I’ve been having this problem where as soon as NC is done syncing a bunch of text files will fire off as modified. I can’t tell what is being modified. I set the .gitattributes file manually to set everything as “LF” end of line ending. I inspect the files in vim in binary mode to see the end of line characters and on both my home linux machine and on my work mac they are LF as intended.

I see no difference between the files. I try diffing the files in vscode’s git tools and I see no difference between the two.

It’s not a huge deal but it’s very annoying that when I push a commit on my config files it will add a bunch of basically unchanged files to each commit. It creates unnecessary noise. I’m not sure how to fix this but I’d be curious to hear your thoughts?

And yes, I know one alternative is to simply not keep any git related projects synced by nextcloud but I don’t think that’s a solution, I think that’s just avoiding the problem. This has worked for me in the past but now it does not.