"This all comes from staying within myself and contributing the way I can," said Giles, who leads the team with 58 runs scored and 49 RBI. "I have to stay disciplined, stay within my strike zone, and if I get a good pitch, take a good swing on it."
Giles was 1-for-3 with two walks and improved his on-base percentage to .429. He has reached base in 23 of 24 games and leads the majors with 71 walks.
"The guy plays hard, and you saw that in the first inning when he went in hard at second base to break up a double play and get us a run," San Diego manager Bruce Bochy said. "That's the way he plays and a terrific job on his part."
Damian Jackson had three hits and Xavier Nady and Khalil Greene added solo home runs for the Padres. San Diego's offense woke up after being stifled Saturday night in the first 1-0 game in Coors Field history.
Hernandez drove in runs with an RBI groundout in the first and a sacrifice fly in the fourth.
Paul Quantrill (1-0), acquired on July 2 from the Yankees, pitched 2 2/3 scoreless innings of relief to earn his first win with the Padres in his third outing.
Jeff Francis (8-6) lasted only four innings and sustained a rare home loss, falling to 8-2 at Coors Field. He allowed a career-high seven runs and equaled his shortest outing.
"Command of his pitches was his issue," Colorado manager Clint Hurdle said. "It was a grind out there from the first inning until the time he left."
Garrett Atkins had three hits and two RBI, and Todd Helton hit
his 10th homer of the season leading off the ninth for Colorado. After Preston Wilson followed with a single, Trevor Hoffman relieved Chris Hammond and got three outs for his 25th save in 27 chances and the 418th of his career.
Jackson singled and scored on Hernandez's fielder's choice in the first inning. The Padres made it 3-0 in the second when former Rockies pitcher Pedro Astacio drove in a run with a two-out bloop single behind first base, and Giles drew a bases-loaded walk.
An RBI double to center by Luis Gonzalez in the second cut Colorado's deficit to 3-1, but Nady hit his 11th home run leading off the third to restore the Padres' two-run lead.
Atkins followed one-out walks to Helton and Wilson with an RBI single to right that made it 4-2.
Giles keyed San Diego's three-run fourth with a triple to center that scored two runs. Hernandez's sacrifice fly gave the Padres a 7-2 advantage.
"I am sure with Hernandez behind me, he wanted to face the lefty instead of a righty right there," Giles aid. "So he made a pitch to me, and I was able to get a good swing on it."
Francis struck out Nady to end the fourth and his first half of the season.
"I didn't make a lot of good pitches when I needed to, and that is the difference between this game and my others this year," Francis said. "When I had gotten into jams, I would make pitches to get out of them."
Pinch-hitter Dustan Mohr hit an inside-the-park home run leading off the Colorado fourth off Dennys Reyes. It was the eighth in franchise history and the fourth at Coors Field. Atkins added an RBI single off Quantrill in the inning as the Rockies closed to 7-4.
Greene hit his fifth homer of the year in the seventh off Dan Miceli.
Astacio, who had his contract purchased from Triple-A Portland before the game, worked the first three innings and allowed five hits and two runs.
To make room for Astacio, the Padres designated pitcher Brian Falkenborg for assignment. Falkenborg was winless with an 8.18 ERA in 10 appearances. ... Astacio is Colorado's franchise leader in several categories including wins (53), starts (129), complete games (14) and strikeouts (749). ... Mohr has two career inside-the-park homers. ... Colorado third baseman Matt Holliday left for a four-game rehabilitation assignment at Double-A Tulsa.