Automakers’ Transition to Electric Cars Got a Jolt From G.M.

Every carmaker is trying to figure out how to make the leap before governments force them and Tesla and other start-ups lure away drivers.