Set environment variables in gitCmd.
Init git repository in createTrivialRepository.