General Motors Co.’s plan to spend $20 billion over the next five years selling more electric vehicles was well received on Wall Street on Wednesday, with the car marker’s stock adding to gains.

GM GM, +0.40% shares extended their advance to close up 3.3% as the company’s “EV day” with analysts in the Detroit area got underway.

GM Chief Executive Mary Barra vowed to “dramatically” change the future of GM and “put everyone in an EV.”

“We believe climate change is real,” Barra said. “We have the ability and the responsibility to create a cleaner planet” and offer car buyers a slew of electric-powered vehicles in all body styles, prices, and to dealerships across the U.S., she said.

The program is expected to be profitable from its start and also includes selling EVs to rideshare providers, Barra said.

GM, which makes the Chevy Bolt, a competitor to Tesla Inc.’s TSLA, -4.14% mass-market Model 3 sedan, last month announced an all-electric Hummer, reviving the name and the cachet of the rugged vehicle whose name became to many people a symbol of size excess and poor fuel economy.

The Hummer as a standalone GM brand was discontinued in 2010. Tesla in late November unveiled its electric pickup, an angular model that drew some comparison with the defunct Hummer.

In addition to the all-electric Hummer, which will be sold under the GMC brand alongside other electric pickup trucks and an SUV, the company also unveiled plans for a larger version of the Bolt and several Cadillac models, including a luxury SUV called the Cadillac Lyriq.

GM also vowed to pursue “continuous improvement” in battery costs, saying its joint venture with LG Chem will drive battery-cell costs below $100/kWh.

Shares of GM have lost 21% in the past 12 months, compared with the 12.2% gain in S&P 500 index SPX, -0.84% and the Dow Jones Industrial Average’s DJIA, -0.46% 5.0% rise.

Shares of rival Tesla have gained 171% in the same period. The recent share rally for the Silicon Valley electric-car maker has pushed the company’s market capitalization to $138.2 billion, compared with $44.5 billion for GM.