`git branch` upstream-setting fixes

also helper script for checking installed `git` version
nice, yea time to autopep8 i guess, thx