SAN FRANCISCO -- Buster Posey had four hits, including a three-run double to help San Francisco break out of a collective funk, and the Giants beat the Milwaukee Brewers 8-5 on Sunday to avoid a four-game sweep.
Pablo Sandoval added a two-run triple before leaving with a possible hamstring injury, Gorkys Hernandez hit his 12th home run and Evan Longoria had a sacrifice fly, his first RBI since spending more than a month on the disabled list.
The Giants had lost four straight and six of seven before winning on a day when they didn't have manager Bruce Bochy.