Check for git repo existance before executing git commands