Git config such that when you commit files, their whitespace is fixed. That is: no lines at bottom, no trailing whitespace on lines.
The .gitconfig does three things:
Tells git to use ~/.git_template to start new git repos (you can re git init existing projects to have changes there take effect.) This is really handy regardless, because it lets you set up your own hooks etc so that you can get git to do things as you wish.
Tells git to compare "rawtext" files as if they had their whitespace stripped.
Tells git that when you check in "trimwhite" files, it should remove whitespace from the end of lines and empty lines from the end of the file.
"But, wait," you may be asking, "what's a 'trimwhite file'?"
Git has this notion of "attributes" which can be assigned to files with either a .gitattributes file, much like .gitignore, or .git/info/attributes. That's what ~/.git_template/info/attributes is about: you set that up in your template, and when you next git init (or git clone), that file will get copied into place. Now git will realize that e.g. *.rb files should be treated as "trimwhite" and do the whitespace trimming on checkin.
As a warning, this means that switching branches in a non-whitespace-clean project will have git behaving as if you'd changed a file. If you can infect your whole team with this setup, though, in time the whole project will be clean and no one will notice.