moved status check behind git check to stop 'not a git repo' errors