Updated

WASHINGTON (AP) — San Francisco manager Bruce Bochy has something to ponder during the All-Star break: how to keep first baseman Travis Ishikawa in the Giants' lineup.

Ishikawa drove in three runs, rookie Madison Bumgarner took a shutout into the seventh inning and the San Francisco Giants beat the Washington Nationals 6-2 on Sunday.

Relegated to a pinch-hitting role for much of the season's first half, Ishikawa has flourished since the Giants moved rookie Buster Posey behind the plate full time, opening an opportunity at first base. He wasn't a slouch as a pinch hitter, either, leading the majors with a .476 average (10 for 21).

"The first few months of this season, I knew I wasn't going to start," Ishikawa said. "I just tried to stay mentally focused on what the job was at hand: I was going to come off the bench to hit or play defense. Just getting the opportunity on this road trip, at first kind of feeling like it was a spot start to give some guys a day off, I went in there with no expectations, no pressure."

On the road trip, Ishikawa was 11 for 29 (.379) with a homer and 10 RBIs.

"He's really taken advantage of the opportunity here," Bochy said. "I knew as soon as Buster started catching, we'd put (Ishikawa) in there and get a left-handed bat in there. He's got some huge hits for us, great job at first base and he's going to get some playing time."

Posey had two RBIs for the Giants, who finished their season-high 11-game road trip 7-4. San Francisco has won seven of nine overall.

Bumgarner (2-2) allowed a run and seven hits in six-plus innings, walked none and struck out six to win his second consecutive start.

"I feel like confidence is a big thing, and if you have a little bit of success you get more confidence," Bumgarner said. "I'm pretty happy with these last two starts."

The Nationals finished the first half by losing three of four. They are 11 games under .500, matching a season low.

"It should leave a sour taste — and it is," Nationals manager Jim Riggleman said

Still, Washington's 39-50 record is considerably better than the 26-61 mark the Nationals sported at last year's All-Star break.

"There's some progress. ... We want to get to the point where we're not satisfied with progress," Riggleman said. "We want to make the next step."

Washington's Livan Hernandez (6-5) struggled through five innings, yielding five runs and five hits. He walked two and struck out four.

"I don't feel too good," Hernandez said. "My body don't respond perfect. It's no excuse. ... I tried to keep the ball down and it didn't happen. A lot of base hits."

Brian Wilson got the final four outs for his 23rd save in 25 tries.

The Giants took a 2-0 lead in the first when Hernandez loaded the bases on an infield single by Aaron Rowand and one-out walks to Aubrey Huff and Posey before Ishikawa knocked a two-run single to right.

In the third, Posey tripled home two runs, then scored on Ishikawa's sacrifice fly for a 5-0 lead.

Freddy Sanchez and Huff singled before Posey was credited with a triple when Nyjer Morgan misplayed his fly ball off the center-field wall. Ishikawa then flied out to center, scoring Posey.

Bumgarner worked out of a bases-loaded jam in the sixth. He exited after allowing Ian Desmond's leadoff single in the seventh and San Francisco needed three relievers to get out of the inning.

Chris Ray walked pinch-hitter Willie Harris and Cristian Guzman hit a one-out RBI single to center. Ray walked Ryan Zimmerman to load the bases and was replaced by Jeremy Affeldt. Adam Dunn singled off Affeldt's left leg, driving in a run, and Sergio Romo came in. Romo fanned Josh Willingham on three pitches and got Rodriguez to fly deep to center.

Juan Uribe added an RBI single off Drew Storen in the seventh for a 6-2 Giants lead.

NOTES: Before the game, a moment of silence was held to honor longtime Yankees public address Bob Sheppard, who died Sunday at 99. Nationals reliever Tyler Clippard, who broke in with the Yankees in 2007, said, "That voice is what being a Yankee was all about." ... A baserunning mistake by Dunn saved Giants CF Rowand from an error in the sixth. With runners on first and second, Rodriguez singled up the middle and a charging Rowand overran the ball. However, Dunn held up at third base, instead of scoring on the miscue, and Willingham, en route to third, had to quickly retreat to second. ... Dunn had three hits for his club-leading 26th multihilt game. ... Posey is 20 for 40 with 15 RBIs in his last 11 games.