San Francisco, CA (SportsNetwork.com) - Tim Lincecum sustained his recent string of success on the mound with another scoreless outing on Friday night.

Lincecum had a season-high eight strikeouts over six scoreless innings and the San Francisco Giants grabbed a 6-0 win over the Miami Marlins in the second of four from AT&T Park.

Lincecum (3-2), who lowered his ERA to 2.00 on the season, has now tossed 14 consecutive scoreless frames at home following his eight-inning gem the last time out in a win against the Los Angeles Angels.

"He was using all four pitches. He's throwing well (and) pitching with a lot of confidence," Giants manager Bruce Bochy said of Lincecum. "It's nice to see him on a roll."

Casey McGehee hit his third career grand slam, Brandon Belt went 4-for-5 and Justin Maxwell added two RBI for San Francisco, which bounced back from a loss in the opener of the series to snap a two-game skid.

Jarred Cosart (1-3) was handed the loss for Miami, yielding four runs on six hits and three walks over four innings.

Buster Posey singled, Belt doubled and Maxwell walked to begin the second inning. Following a strikeout of Brandon Crawford, McGehee picked up his teammate with a drive to left-center to give the Giants a 4-0 advantage.

Lincecum had some control issues in the fifth, but he worked out of a bases- loaded jam with a huge strikeout of Giancarlo Stanton. Adeiny Hechavarria singled and Donovan Solano walked to begin the inning for Miami. Lincecum got Justin Bour to pop out prior to striking out Christian Yelich.

Martin Prado then walked to pack the bags and Lincecum pitched Stanton soft to get out of the frame. He started the at-bat with a 12-6 curveball over the knees for a called strike and got Stanton to check his swing on a changeup in the dirt. Lincecum went back to the changeup on the next pitch and stranded the three Marlins on base to the delight of the Giants crowd.

"We couldn't get anything going there," said Marlins manager Mike Redmond. "We had one shot to score some runs, and it didn't happen."

The Giants used that momentum from Lincecum in the home fifth as Maxwell poked a single to right that scored Posey for a 5-0 lead.

Maxwell had an RBI single in the seventh and McGehee came up again with the bases loaded later in the frame, but Nick Masset got him to ground into a 5-2-3 double play.

Yusmeiro Petit took over for Lincecum and earned his first save for three scoreless innings in relief.

Game Notes

The Giants have pitched shutouts in four of their last six games ... Matt Cain presented McGehee with the 2014 NL Comeback Player of the Year Award he won while playing with Miami last season. McGehee spent a season in Japan before returning to the big leagues prior to 2014 ... The Giants outhit Miami 12-3 ... The Marlins went 0-for-8 with runners in scoring position.