`git branch` upstream-setting fixes

also helper script for checking installed `git` version
Everyone outside of Google uses 4 spaces as an indentation in Python :)