Use EditorConfig to define a some basic styling rules for code. This should also help to reduce the number of commits introducing trailing whitespace. See http://editorconfig.org/ for details.