Giants 5, Marlins 3: Hunter Pence recorded two hits and two RBIs while Tim Hudson tossed 7 1/3 strong innings as visiting San Francisco handed Miami its sixth consecutive loss.Pablo Sandoval added three hits and scored twice for the Giants, who have won three consecutive games for the first time since capturing five straight from June 4-8. Hudson (8-6) snapped his four-game losing streak, allowing one run on eight hits with three strikeouts, and improved to 15-4 lifetime against the Marlins.Christian Yelich went 2-for-4 to extend his hitting streak to 12 games and Giancarlo Stanton belted his 23rd homer for the Marlins. Henderson Alvarez (6-5) gave up two runs - one earned - in 2 2/3 innings before leaving with a left shin contusion after being struck by a ground ball off the bat of Joe Panik.Casey McGehee lashed an RBI single up the middle with two outs in the first inning to give Miami the lead, but the Giants moved in front for good in their next at-bat. Brandon Belt doubled home the tying run before scoring on a passed ball and a throwing error by Marlins catcher Jarrod Saltalamacchia.San Francisco extended its lead to 5-1 in the fourth when Hudson worked a bases-loaded walk with two outs and Pence followed with a two-run single. Stanton led off the ninth with a solo blast off Sergio Romo while Marcell Ozuna doubled with two out and scored on Saltalamacchia's single before Santiago Casilla got the final out for his fifth save.GAME NOTEBOOK: The Giants' defense helped Hudson by turning a double play in each of the first three innings. … Belt also left the game in the third inning due to dizziness. … Miami optioned 1B Justin Bour to Triple-A New Orleans and recalled 2B Jordany Valdespin, who went 1-for-4 in his season debut.