SAN FRANCISCO – When the Giants intentionally walked Dansby Swanson to put two runners on base with two out in the seventh inning of a scoreless game Friday night with pitcher Jaime Garcia on deck, Braves manager Brian Snitker could’ve brought in a pinch-hitter.

He has plenty of times in similar situations this season, and to say with mixed results would be putting it kindly.

But with Garcia pitching efficiently and effectively and the Atlanta bench less than formidable, Garcia was left in to hit. And hit he did, sending a ball through the left side for an RBI single, with Swanson hustling to score a second run on the decisive play in the Braves’ 2-0 win against the Giants in a series opener at AT&T Park.

“I was glad he left me in. It worked out,” Garcia said. “Their pitcher, (Matt) Cain, was pitching great. I just got a good fastball in the middle of the plate and was able to do some damage with it.”

The Braves opened a nine-game trip and three-game series with their first shutout of the season and 10th win in 15 games. They’ve won six straight series openers and haven’t lost any of the past five series, winning three and splitting two.

Tyler Flowers, who started the seventh-inning rally with a single, scored from second base and was struck by left fielder Brandon Belt’s throw, re-directing the ball toward the Braves’ dugout just far enough for Swanson to charge around third base and slide in for the 2-0 lead.

“(Flowers) was going, so I was just going to keep going,” Swanson said. “It’s just kind of a baseball play, just keep going and follow him. I was just watching the play as I was running and I saw it ricochet off him and I just kept rounding (third base). I thought it scooted far enough way where I could make it home.”

Swanson popped up excitedly after he slide across the plate, pounding his hands together and shouting.

“As a third-base coach you want those guys to come hard and make you make a decision,” Braves manager Brian Snitker said. “He was aggressive and looking for something to happen as soon as that ball was hit. Just good, aggressive baserunning right there.”

Swanson never slowed as he rounded third base.

“I just kept running. Kind of like, ‘Run, Forrest, Run,’” he said. “I don’t even remember if Wash (third base coach Ron Washington) sent me or not. I just reacted and kept going.”

Garcia allowed just four hits and two walks (one intentional) with five strikeouts in 6 2/3 innings, improving to 4-1 with a 2.54 ERA in nine games (eight starts) against the Giants including wins in each of his past four decisions.

He became the first Braves starter to not allow a run while accounting for all the RBI in a game since Tim Hudson did it in a 2-0 win against Toronto in June 2011, when Hudson pitched eight innings and hit a two-run homer. Garcia got one RBI Friday and the other run scored on Belt’s error.

Garcia(2-3) has allowed one earned run in 14 2/3 innings over his past two starts, with 13 strikeouts and two walks.

“No. 1 is being able to keep the ball down, keep the ball on the ground,” Garcia said. “That’s my game, that’s what I try to do every time I take the mound. And then use my off-speed the right way, keep them off-balance and execute pitches on both sides of the plate. Tonight, for the most part I was able to do that.”

The veteran left-hander wasn’t pleased when Snitker removed him with two out and a runner on first base in the seventh inning, after the Giants announced Michael Morse would pinch-hit for pitcher Matt Cain. But that decision worked, too, as Jose Ramirez induced a comebacker to the mound to get out of the inning.

“I just didn’t like that matchup right there with him and Mike Morse,” Snitker said of replacing Garcia at that point.

After Eduardo Nunez reached on a swinging-bunt single with one out in the first inning, Garcia retired the next 11 batters before Justin Ruggiano singled to start the fifth inning. Garcia set down the next three in order. He threw 59 strikes in 83 pitches and didn’t issue an unintentional walk until Brandon Crawford walked to start the seventh.

Garcia issued 14 walks in a span of three starts before not walking a batter in eight innings of his last start Sunday against the Nationals, when he gave up seven hits and three runs – only one earned – and became the first Braves pitcher to work eight innings this season.

“It’s good to see him coming around and banging the strike zone like that,” Snitker said.

He got a hard-luck loss in that game against the Nationals, and in the sixth inning it was looking as if Garcia might suffer a similar fate Friday. After a one-out single from Denard Span, Nunez reached on an infield hit when rookie third baseman Rio Ruiz dove to stop a ball that shortstop Swanson was in position to field behind him and make a throw.

Ruiz had it bounce off his glove, but likely wouldn’t have had time to get up and make a play even if he’d caught it.

With two on and one out, Brandon Belt followed with a grounder that first baseman Matt Adams fielded to his right. But as Adams was about to throw, he didn’t have grip a good grip on the ball and had to settle for an out at first base, scrambling to run back and get his foot to the base before Belt.

Buster Posey was intentionally walked to load the bases before Garcia got an inning-ending grounder from Ruggiano.

Before Friday, the Braves were 5-9 with a 5.38 ERA at San Francisco since the beginning of the 2014 season, but these Giants are not like those of recent vintage. They fell to 20-30 with the loss including 11-11 at AT&T Park, where they extended their remarkable streak to 511 consecutive regular-season sellouts.