General Motors Co. joined a growing group of automakers promising an emissions-free future for cars by pledging to sell 20