LOS ANGELES >> Robbie Ray pitched five hitless innings in his San Francisco debut, Matt Chapman homered and the Giants beat the Los Angeles Dodgers 8-3 on Wednesday night.

The Giants held the Dodgers without a hit until Chris Taylor doubled to right off reliever Tyler Rogers with two outs in the seventh inning.

Ray (1-0) had his first outing since Tommy John surgery in May 2023. He was electric after the first inning, allowing just one earned run on a bases-loaded walk. He struck out eight and threw 86 pitches.

“I was a little amped up in the first to get out there,” Ray said. “Really excited. Everything felt good. Just kind of getting a little quick with my front side. I knew my stuff was going to play regardless. I knew if I got through that first inning I could settle down. “

The Giants snapped the Dodgers’ five-game winning streak and have a chance to split the series Thursday.In the eighth inning, the Giants got to the Dodgers’ fatigued bullpen. They scored six runs on five hits, with five earned runs charged to reliever Yohan Ramirez.

“We haven’t had too many of those,” Giants manager Bob Melvin said. “It’s nice to put a crooked number up. We felt good about who we had coming in the game for the last four innings. To put a crooked number like that, you’re able to not be so fine and every at-bat doesn’t mean potentially a disaster.”

Chapman hit a solo home run to center field off Tyler Glasnow to tie it at 1in the fourth inning. He was 2 for 3 with two runs, two RBIs and he walked twice. Chapman’s homer was his 14th of the season. Mike Yastrzemski added an RBI single in the inning to make it 2-1.

Ray was wild in the first inning as he walked two and hit two but gave up just one run in the inning.

He walked Andy Pages with the bases loaded to force in a run, but got out of more potential trouble. He was dominant after that and retired 14 consecutive batters. Ryan Walker retired the side in the sixth to make it 17 consecutive batters and it became 19 when Rogers retired the first two he faced before Taylor’s double.

Los Angeles’ Shohei Ohtani was 0 for 4 with three strikeouts.

Glasnow (8-6) returned to the mound after missing two weeks due to what he jokingly called “tall-guy back.”

“I think it was the rust of not pitching,” Dodgers manager Dave Roberts said. “I think his stuff was good. Certainly, the command wasn’t there.”

Glasnow walked four in five innings.