Mike Yastrzemski tied the game with a two-out, two-strike homer Wednesday in the top of the ninth, and the Giants finished off an 8-5 win over the Cardinals, getting their first sweep in St. Louis since 1998.