Lyft is on track to go public later this week, after the company's IPO road show generated strong demand for its shares.

This raises the question of what General Motors (GM -0.47%) should do with its stake in Lyft after the ride-hailing company's lockup period for current investors expires later this year. Given that GM's initial plans for a wide-ranging partnership with Lyft have long since fizzled out, the General probably should sell its Lyft stake over the next year and use the proceeds to buy back its own undervalued shares.

Lyft and GM: more hype than substance

General Motors acquired its Lyft stake in early 2016. The top U.S. automaker invested $500 million in the Uber rival as part of a $1 billion fundraising round. GM's then-president, Dan Ammann, took a seat on Lyft's board, and the two companies talked about collaborating to deploy self-driving cars in Lyft's ride-hailing network.

During 2016, General Motors and Lyft also rolled out a program called Express Drive to lease GM vehicles to Lyft drivers at subsidized rates. (For the most active Lyft drivers, the ride-hailing company covered all of the leasing costs.)

However, just two months after investing in Lyft, GM dove deeper into the autonomous vehicle race by buying Cruise Automation for over $1 billion. Since then, General Motors has invested heavily in Cruise, including testing a "robo-taxi" service in San Francisco. This effort looks extremely promising, as evidenced by the billions of dollars of outside investment that the auto giant's GM Cruise subsidiary has attracted.

A white Chevy Bolt autonomous vehicle

Cruise has been a centerpiece of GM's recent investment activity. Image source: General Motors.

Later in 2016, GM also began offering short-term vehicle leases to Uber drivers, mimicking the Lyft Express Drive program.

Once GM began to spread its self-driving bets around, Lyft decided to do the same. Over the past two years, it has announced partnerships with several other automakers and tech companies. The result was that by mid-2018, there was no active collaboration between GM and Lyft, and Ammann had stepped down from the latter's board.

Check out the latest earnings call transcript for General Motors.

The Lyft stake is valuable

Based on Lyft's proposed IPO price, the $500 million investment that GM made a little more than three years ago could be worth $1.3 billion. And given the level of investor interest in Lyft -- and the ride-hailing industry more broadly -- there's a decent chance that the shares would be worth even more six months from now, when GM would be permitted to start selling its stake.

Even with a value of $1.3 billion, GM's Lyft stake would account for more than 2% of the automaker's market cap. That's a significant sum of money that could potentially be invested in growth initiatives, used for debt reduction, or returned to shareholders.

There's no good reason to hold on

If General Motors were still cooperating with Lyft in any meaningful way, it would make sense to maintain a minority investment in the ride-hailing company. However, its relationship with Lyft is now purely financial. Given how much money GM and its partners are investing in Cruise, it seems unlikely that this situation will change. Finally, the General doesn't have much input into Lyft's strategy anymore, as it no longer controls a board seat. As a result, GM ought to sell its Lyft stake after the IPO lockup period expires.

GM's core auto business generates more than enough cash to meet its investment needs. Furthermore, the company already has ample capital set aside for investments in Cruise. That means there's no compelling need to reserve the eventual proceeds from selling GM's Lyft stake for internal investments.

Meanwhile, GM stock is extremely cheap right now, trading for less than seven times earnings. The company's core auto operations carry an even lower earnings multiple, given that GM Cruise has a valuation of more than $10 billion despite being unprofitable.

That makes share buybacks look like a good use of excess capital. Long-term GM shareholders are likely to be better served by the company selling its Lyft shares and repurchasing its own stock -- which seems to be quite undervalued right now -- rather than holding on to the Lyft stake in the hope of realizing even bigger gains.