Add your IDEA formatting configuration to the repository
You can change your IntelliJ IDEA code formatting options at Settings → Code Style → Java
(or whichever language you're using). There you can click on gear button (next to 'Scheme' dropdown) and choose 'Copy to Project' to save your settings to the repository.
This way you can avoid unnecessary diffs when everybody has the same formatting options. The config files are saved to .idea/codeStyles/
which you probably have in your .gitignore
file. Remember to exclude it:
**/.idea/*
!**/.idea/codeStyles/