PHOENIX -- Winning 10 games may seem like a modest goal for a pitcher. Not one who didn't make his first career start until May.
Collmenter (10-10) allowed five hits and two runs for his second win against the Giants this season. Collmenter struck out four and walked one.
"It's been one heck of a ride this year," Collmenter said.
Collmenter made one start with Triple-A Reno and seven appearances out of the bullpen before making his first start on May 14 at Los Angeles.
He's had both highs -- a 12-inning scoreless streak to begin his career as a starter -- and lows -- a four-game midseason losing streak -- while relying primarily on just two pitches, a fastball and a changeup.
"I worked on that third pitch (a curveball) to make it a weapon all the time," Collmenter said.
Though Arizona has clinched the NL West title, the Diamondbacks remain a game behind Milwaukee in an attempt to gain home-field advantage in the first round of the playoffs.
"Our intentions are to win out," Diamondbacks manager Kirk Gibson said. "We may. We may not. But wherever we have to go on Saturday, that's fine. It's good times. It's fun."
J.J. Putz pitched the ninth for his 45th save.
He initially remained in the game and scored Arizona's second run, but left after the inning for precautionary reasons. Neurological tests on Upton were negative and he is listed day to day.
"If you're going to get hit in the dome that's probably the best place," Putz said.
"It was embarrassing," Giants manager Bruce Bochy said. "Matt (Cain) threw a great game (Friday) and it could have gone either way. But the last two, we were ugly. There is no getting around it. That is not the way we want to finish up."
The Diamondbacks took a 2-0 lead against Lincecum in the first. Hill drew a one-out walk and went to second when Upton was hit in the helmet. Both scored when Montero followed with a double into the right-center field gap.
"We've had good luck when guys hit J-Up this year," Gibson said. "Fortunately he hasn't been seriously injured, but we've done well in those situations."
Lincecum said the pitch to Upton affected his original game plan.
"I was kind of afraid to go in for fear that kind of stuff would happen again," said Lincecum, who approached the plate to check on Upton and also sent a message to the right fielder.
"I had one of the players send a message over there saying that it was a complete accident and I had no intention of doing that.
"I just kind of lost it. I was trying to go low and away and it was the complete opposite."
Paul Goldschmidt led off the fourth with a double to right and Cowgill made it 3-0 with a one-out double to right field.
Hill drove in Gerardo Parra on a ground-rule double in the fifth and scored on a ground out for a 5-0 lead.
Lincecum allowed five runs and eight hits with two walks and three strikeouts.
Giants C Chris Stewart was shaken up when a Lincecum pitch bounced up and hit him on the left cheek in the fifth. Stewart finished the inning, but gave way to Hector Sanchez in the top of the seventh. ... Giants manager Bruce Bochy was ejected by second base umpire Gary Darling in the bottom of the fifth for arguing after Parra stole second. Stewart's throw to Jeff Keppinger easily beat the runner, but Darling ruled the second baseman had missed the tag. Replays were inconclusive. ... The Diamondbacks went over 2,000,000 in attendance. Sunday's crowd was announced at 41,423, raising the total for the three-game series to 132,925 and the season to 2,010,340.