Pirates 4, Giants 3: Travis Snider recorded two hits, knocked in a pair of runs and scored one as host Pittsburgh edged San Francisco to take two of three in the series.Gerrit Cole (3-2) allowed three runs on seven hits and struck out seven in eight strong innings to earn the victory and Mark Melancon pitched the ninth for his second save. Andrew McCutchen had two hits and an RBI while Ike Davis collected three singles and Chris Stewart added two for the Pirates.Brandon Belt homered and doubled, knocking in three runs, as the Giants dropped their second straight after a six-game winning streak. San Francisco starter Tim Linecum (2-2) yielded four runs on eight hits over four innings while striking out four and throwing 88 pitches.Belt homered to right on the first pitch he saw from Cole in the opening inning and the Pirates countered with two in their half of the frame on McCutchen's RBI single and a run-scoring double by Starling Marte. Stewart and Cole singled to lead off the second and both scored on Snider's single down the right-field line.Pablo Sandoval delivered a pinch-hit single and Hunter Pence walked with two outs before coming home on Belt's double into the right-field corner in the fifth. Cole gave up one hit from the sixth through the eighth innings and Melancon retired the Giants in order with help from a diving catch by McCutchen in center field.GAME NOTEBOOK: McCutchen finished the series 7-for-15 and is 14-for-33 in eight games during May. … Belt took over the team lead with his ninth homer and has 17 RBIs, tied for second with C Buster Posey. … The Giants start a four-game series at the rival Los Angeles Dodgers on Thursday and Pittsburgh continues its homestand Friday when the St. Louis Cardinals visit to begin a three-game set.