San Francisco Giants starting pitcher Trevor McDonald throws against the...

San Francisco Giants starting pitcher Trevor McDonald throws against the Arizona Diamondbacks during the first inning of a baseball game, Wednesday, July 1, 2026, in Phoenix. Credit: AP/Ross D. Franklin

PHOENIX — Trevor McDonald pitched six scoreless innings, Victor Bericoto hit a two-run homer and the San Francisco Giants beat the Arizona Diamondbacks 6-4 on Wednesday night.

Heliot Ramos had a solo homer and an RBI triple to help the Giants snap an eight-game skid against Arizona. San Francisco avoided being swept by the Diamondbacks for the third time this year and its first 0-9 start to a season against a single opponent in franchise history.

McDonald (3-6) allowed one hit — a leadoff single by Ketel Marte in the fourth — and struck out five without a walk. The 25-year-old right-hander was 0-6 with a 6.47 ERA in his previous seven starts.

Caleb Kilian pitched a 1-2-3 ninth with two strikeouts for his seventh save.

Ramos, Bericoto, Jung Hoo Lee and Drew Cavanaugh had two hits apiece.

Ramos hit the first pitch in the fifth 427 feet over the wall in center field. Lee followed with a single and, two pitches later, Bericoto added a 422-foot shot that made it 3-0.

Rafael Devers walked with two outs in the sixth and Ramos tripled off the top of the wall in center before Lee and Cavanaugh added run-scoring singles that gave the Giants a 6-0 lead.

San Francisco Giants' Heliot Ramos watches the flight of his...

San Francisco Giants' Heliot Ramos watches the flight of his home run against the Arizona Diamondbacks during the fifth inning of a baseball game, Wednesday, July 1, 2026, in Phoenix. Credit: AP/Ross D. Franklin

Arizona starter Zac Gallen (3-8) gave up six runs and seven hits in 5 2/3 innings.

Marte had two hits, including an RBI double, and two stolen bases. Pavin Smith and Corbin Carroll each added an RBI in a four-run eighth.

Up next

The Giants begin a series Friday at Colorado.

The Diamondbacks host a three-game series against Milwaukee that begins Friday.

4th of july sale

Digital Access

25¢

for
6 MONTHS

CELEBRATE NOW >Cancel anytime - New subscribers only