Daniel Veillard wrote:
On a related note, I've installed a so-called git "update" hook
that prevents one from pushing a merge commit. That same hook also
prohibits pushing any commit that adds trailing blanks. I.e., if you
accidentally commit (locally) such a change, when you try to push,
it'll point at the offending lines and refuse to push. Then you'll
have to use commit --amend -a to fix it (if it's the topmost commit) or
"git rebase -i ...".