refactored the git stuff to get independent commands