Q: How do I automatically reject long GIT commits? Ideally I'd like to check the number of lines changed and reject is it's greater than some number. I think I understand the commit-hooks are the right way to go about it but I've struggled to get it working or get the number of lines that the commit changes. 

A: Without judging the pertinence of such a hook, note that this kind of restriction is precisely what Virtual References or "VREFs" are for in gitolite (a small authorization layer you can out on top of git)
You can see the list of default VREFs here.
It includes VREF / MAX_NEWBIN_SIZE which does use diff --stat, to prevent committing large binary files (which is actually a good limitation to have enforced in a git repo).
`git diff --stat=999,999 $oldtree $newtree`

