BUG: Bugfix to handle branch without remote and missing fetch for new remote in git.latest
STY: pep8 fixes
Merge pull request #16200 from cimarronm/states.git.latest_bugfixes

states.git.latest bugs with new remotes