Tabs in one file, four spaces in the next, Windows line endings sneaking in. A small .editorconfig file in the project root settles most of that before it reaches a diff.
This is a reasonable starting point:
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[*.py]
indent_size = 4
[Makefile]
indent_style = tab
Sections match file names, and later ones override earlier ones for the files they match. The root = true line at the top tells editors to stop looking for more of these files in parent folders.
Commit the file and everyone who opens the project gets the same rules, whatever their personal settings are. I find it much friendlier than a paragraph in a contributing guide that nobody reads.
Support varies. Some editors read the file natively, including Neovim, WebStorm and Xcode, while others need a plugin, Visual Studio Code among them. Also, these settings apply to what you type and save from now on. Existing files don’t get reformatted, so a project with mixed indentation stays mixed until you run a formatter over it.
Further reading: EditorConfig
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more