SAN FRANCISCO (AP) Still on a pitch count following a shoulder injury that sidelined him for the final 2 1/2 months last season, Jeff Samardzija knew he had no shot of going the distance against Colorado.
Kevin Pillar made sure Samardzija at least got a win, something that had eluded him for nearly a year.
''Today was a good day,'' Samardzija said. ''That's the way it's going to go here for a while until we get that arm strength where we want it. It's constant work, but when you get nights like that tonight, it gives you a little more energy to keep doing what you're doing, keep going.''
Samardzija (1-0) went seven innings and outpitched Rockies starter Jon Gray to win in a matchup of sputtering offenses. Colorado has lost six straight and 10 of 11.
The Rockies were shut out for the second time this season and have not held a lead since Chris Iannetta's 11th-inning homer on April 3 at Tampa Bay.
Samardzija permitted three hits, one walk and had a season-high seven strikeouts. Tony Watson retired three batters and Will Smith worked the ninth for his fourth save.
''He had a good mix going tonight, good command of all of them,'' Giants manager Bruce Bochy said about Samardzija. ''He was on top of his game. This has to do a lot for his confidence.''
Samardzija allowed only one runner past first base and retired 10 of his final 11 batters. The right-hander won for the first time since April 20, 2018, when he pitched five scoreless innings to beat the Los Angeles Angels in his first start of the season.
''Last year was not a great year for me but I learned a lot,'' Samardzija said. ''It's definitely been a little bit of an evolution for me and a process, and we're kind of seeing where we're at.''
Gray (0-3) was almost as sharp but tied a National League record by allowing a home run in his 15th consecutive start. That was the only blemish on an otherwise crisp night for Gray, who gave up five hits and three walks with six strikeouts.
''In any well-pitched game the margin is really thin,'' Rockies manager Bud Black said. ''Samardzija pitched great and Jon pitched great. It comes down to a pitch or two.''
Gray pitched in and out of trouble most of the night until Pillar's home run leading off the seventh. Acquired from Toronto last week, Pillar has 10 RBIs over his last four games.
''I wanted to get strike one on Pillar but I left the pitch up too much,'' Gray said. ''It was a good slider but I just put it in the wrong place and he put a good swing on it.''
Mark Leiter (1996) and Ramon Ortiz (2005) also allowed home runs in 15 straight starts. The major league record is 20 set by Hall of Famer Bert Blyleven (1986-87).
As manager of the Rockies and San Diego Padres, Black has spent the better part of his career matching up against Bochy. Bochy has announced his plans to retire at season's end, and Black is sad to see him go. ''There's no better in-game strategist than Bruce,'' Black said before the game. ''I'm going to miss him. He's a throwback. He's got a great baseball mind.''
San Francisco second baseman Joe Panik made a diving stop on Charlie Blackmon's sharp liner leading off the ninth. That matched the defensive gem made in the second inning by Colorado left fielder Raimel Tapia, who made a diving grab to rob Pablo Sandoval of a hit.
Rockies: 1B Daniel Murphy saw a hand specialist in Arizona, but the Rockies had yet to receive results. Murphy is out with a broken left index finger. ... OF David Dahl (left side core injury) ran and played long toss in Arizona, although Black said the team plans to take a cautious approach with Dahl's rehab.
Giants: 3B Evan Longoria was rested. Sandoval started and went 0 for 4.
Rockies RHP Chad Bettis (0-2, 11.88 ERA) attempts to get on track after allowing six runs in each of his previous two starts. The Giants counter with LHP Drew Pomeranz (0-1, 4.00).
More AP MLB:�https://apnews.com/tag/MLB and�https://twitter.com/AP-Sports
Copyright 2019 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.