only run git commands in production mode

When tests are run ony print out what git command would have run.