An early onslaught against San Francisco Giants starter Tim Lincecum gave the Pirates a 4-3 win against the Giants at PNC Park Wednesday.

The Pirates won their second game in a row and won the series, and have won four of their past six after a disastrous stretch in late April. Ike Davis had three hits, Travis Snider went 2-for-3 with a triple and two RBIs and Chris Stewart went 2-for-3.

Gerrit Cole completed eight innings for the second time in his major league career and allowed three runs on seven hits, striking out seven. Gaby Sanchez pinch-hit for Cole in the eighth inning with a runner in scoring position.

Cole’s outing followed an eight-inning effort from Charlie Morton in Tuesday’s game.