This will change your life. Add this as a git pre-push
hook.
How, you ask?
wget https://gist.github.com/dfm/5828028/raw/772270b65a804678db70012d3406f41c79cb53a5/pre-push
chmod +x pre-push
mv pre-push /path/to/your/favorite/repo/.git/hooks
cd /path/to/your/favorite/repo
git push