Hernandez and Matt Kemp each homered for the second consecutive game, Alex Wood got his first victory since May 20 and the Dodgers beat Bumgarner and San Francisco 3-1 on Saturday night.
Hernandez's two-run shot in the fifth inning was his fourth career homer against Bumgarner in 34 at-bats. He also has five doubles against the left-hander.
The utility player usually feasts on Bumgarner's fastballs, but he punished the left-hander for a bevy of breaking pitches Saturday, crushing one into the left field seats for his 10th home run this season.
''He adjusted to me and I hadn't really made many adjustments,'' Hernandez said. ''Today he came at me with the same gameplan and it took me three at-bats to adjust, but I'm glad that I did.''
Bumgarner (0-2) was making just his third start since returning from the disabled list because of a broken finger that occurred during spring training. He threw 112 pitches while giving up three runs on five hits over six innings.
''Each time out I'm getting better and better, that's all I can ask for,'' Bumgarner said. ''It's the first time I went over 100 pitches and my velocity is creeping up and my stretch and grip is coming back.''
The Dodgers have won five straight, all at home, and are 11-2 in June and 21-6 since May 17.
The Giants have lost 17 of their last 23 road games and are 3-6 on their 10-game trip to Washington, Miami and Los Angeles.
Kemp hit his 12th home run and has reached base in 15 of his last 18 games against the Giants. Both Hernandez and Kemp went deep in a 3-2 win Friday over the Giants.
The Dodgers lead the majors with 34 home runs in 13 games in June.
Kenley Jansen pitched the ninth for his 17th save.
The Dodgers clinched their first series victory over the Giants this season and evened the season series 6-6.
WOOD STANDS TALL IN VICTORY
Wood (2-5) credited a change in mechanics for his improvement Saturday. He was coming off a three-start stretch when he gave up 13 earned runs in 12 innings, going two innings in one start and 4 2/3 in another.
On Saturday, the left-hander gave up one run on four hits over 5 2/3 innings with two walks and two strikeouts. He held the Giants hitless until Mac Williamson singled to lead off the fifth.
''We found something with my posture,'' Wood said. ''I saw some good strides in my (between-start) bullpen and got some repetitions out there. I felt really good with the adjustment and saw that translate over.''
Wood gave up three hits in the fifth, but the Giants' only run in the inning came on a sacrifice fly from Alen Hanson. Wood threw 29 of his 85 pitches in the fifth inning.
''As the game went on, I got a little fatigued,'' Wood said. ''I think you naturally start to revert back to some of the things you got yourself into, but I felt really good about the progress tonight.''
Giants: 3B Evan Longoria elected to have surgery to insert a pin into his fractured left hand with the hopes of returning shortly after the All-Star break. ... RHP Johnny Cueto, on the DL with right elbow inflammation, will throw live batting practice Monday. ... RHP Jeff Samardzija (shoulder) pitched three innings for Triple-A Sacramento on Friday and manager Bruce Bochy said he believes his starter will be back soon.
Dodgers: LHP Clayton Kershaw (back) will pitch a three-inning simulated start either Tuesday or Wednesday at Dodger Stadium while the Dodgers are in Chicago to face the Cubs. Manager Dave Roberts said Kershaw will follow that outing with a bullpen session and likely another simulated start before going out on a minor league rehab assignment. ... LHP Rich Hill (blister) followed his minor league rehab start Thursday with a bullpen session Saturday and remains on track to return to the active roster Tuesday at Chicago.
RHP Chris Stratton (7-4, 4.56 ERA) will pitch for the Giants on Sunday at Dodger Stadium in the finale of a three-game series. LHP Caleb Ferguson (0-0, 9.53) will be looking to pitch past the fourth inning for the first time as he makes his third career start for the Dodgers.
More AP baseball: https://apnews.com/tag/MLBbaseball
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.