07/07/2013 11:07 am ET Updated Sep 06, 2013

Giants Get Much Needed Win Behind an All-Star

San Francisco, CA - It was a bizarre start but some how, the Giants got a much needed win out of it. San Francisco snapped a four-game losing streak and split the series with a 4-2 victory over the Dodgers.

In the first frame Madison Bumgarner who will be making his first Major League All-Star appearance retired the side. Bottom of the inning the Giants got a leadoff double from Gregor Blanco. Marco Scutaro was out on a sacrifice bunt and Buster Posey followed with a RBI double that was overturned when the umpires realized he batted out of order.

Los Angeles manager Don Mattingly walked onto the field with a lineup card to show that the order was different, thus Posey's double was overturned and Pablo Sandoval who was listed in the number three position was charged with a groundout without stepping to the plate.

"I just said at that point what else?" said San Francisco manager Bruce Bochy. "At that point you just want to win the game."

If that wasn't enough to add to the Giants list of things that have gone wrong over the past month. They did see the end of the rainbow when Bumgarner pitched seven solid innings, allowing two earned runs on three hits with nine strikeouts.

The outing marked his fifth straight quality start and twelfth of the season. Four of the last six wins for San Francisco have come in Madison starts. Also, not a bad way to thank his manager, teammates and fans on the day FoxSports announced the MLB All-Stars starters and reserves.

"That's a huge honor for the All-Star game, but we really needed the win," said Bumgarner.

The Giants were well aware of what was at stake if they lost another game. The NL West division is a tight race and San Francisco is only 5 1/2 games behind the first place Arizona Diamondbacks. So, the offense took advantage of a few crucial errors made by the Dodgers.

The Giants scored three of their runs in the second. Brandon Belt was hit by a pitch and Andres Torres hit a infield single. A throwing error on a fielder's choice loaded the bases and Stephen Fife gave a free pass to Madison for an RBI walk. Blanco hit a RBI single and Scutaro's sacrifice fly scored in the third run.

San Francisco's final run came by way of their southpaw whose sacrifice fly scored in Torres after he advanced to second on a fielding error by Hanley Ramirez. After that the Giants offense was stifled but that was sufficient as long their defense kept Los Angeles runs down.

The Dodgers bullpen pitched 3 2/3 hitless innings after Fife's outing lasted 4 2/3 innings but failed to to get the runs they needed for the win. Bumgarner retired the first 14 batters he faced, didn't walk a batter which he hadn't done since April 19th. He also flirted with a no-hitter through four innings.

Andre Either was the first batter on base after he hit a single that landed right in front of left-fielder Andres Torres. Two pitches later Los Angeles catcher Tim Frederowicz belted a two-run home run that cut San Francisco's lead in half.

"I let him [Stephen Fife] down," Ramirez said. "We didn't do the job today."

The Dodgers tried to rally back in the seventh when Hanley tripled. But when Juan Uribe grounded to third baseman, Sandoval threw Ramirez out at home. Hanley could've stayed at third but got anxious and tried for the score.

Rookie Puig has been the talk of the MLB since arriving to the Dodgers June 3. He's accomplished so much in just on month, including striking out four times in all four of his plate appearances. The rookie donned the sombrero just hours after being named one of five candidates for the All-Star National League final vote by the fans.

"He's [Yasiel] a good hitter and we're fortunate enough to get him out today," said Madison.