Honestly, I kinda get it. I'm tired of people pushing Xcode dotfiles and __MACOSX folders to the main branch. If you're not conscious of the machine you use and the formats you employ, how can you be expected to collaborate effectively?
I've been doing this for decades and I don't even know what an Xcode dotfile is.
Maybe you mean .DS_Store files? That's probably best described as a Finder dotfile... For that, maybe just add the line ".DS_Store" to your .gitignore (or the equivalent for your SCM software)?