Every carmaker is trying to figure out how to make the leap before governments force it and Tesla and other start-ups lure away drivers.
A new president took office this month determined to fight climate change. Wall Street investors think Tesla is worth more than General Motors, Toyota, Volkswagen and Ford put together. And China, the world’s biggest car market, recently ordered that most new cars be powered by electricity in just 15 years.

Those large forces help explain the decision by G.M.’s chief executive, Mary T. Barra, that the company will aim to sell only zero-emission cars and trucks by 2035.