Unify local git version check

merged logic from tmux and newzdash checks into separate function