Wells cruised through six innings after giving up singles to the first two batters of the game, with Emmanuel Burriss stealing second and scoring on Mike Fontenot's single. Wells struck out seven against a lineup that featured Pablo Sandoval, Pat Burrell and Aaron Rowand, and didn't walk a batter.
Byrd singled twice and walked and scored on Scott Moore's double in the fourth inning. Moore later scored on Bobby Scales' RBI single.
The Giants tied it in the eighth when Travis Ishikawa scored on Sean Marshall's wild pitch after he singled and advanced to third on Eli Whiteside's double.
The Cubs won it on Wellington Castillo's one-out single off Josh Banks to score Scales.