They did it. They actually did it: The Giants finally beat the Diamondbacks.

The win feels a bit like finding a crumpled up dollar in your pocket after getting mugged for your wallet and phone. Less of a win, more of “not a total loss”, but the Giants will take it. These small victories are what they’re playing for as the calendar flips to July and speculation abounds before the trade deadline. Unabashed sellers, they enter the market with trench coat fully open, rattling their wares: “Franchise cornerstones, here. Get yur cornerstones here. 100% authentic, no-doubt, real-deal cornerstones here!”

In this weird purgatorial state, all the Giants have is the day. This is the team until it’s not the team anymore. As a member of the roster, you have to find other things to play for: individual achievement, camaraderie, development of skill, love of the game (hopefully), proof you belong, to avoid total embarrassment.

Saving face — that’s a big one. Dropping to 0-9 to the Diamondbacks, three consecutive series sweeps to a division rival that was formed in the 90’s…that would’ve been too much to bear. Then there’s right-hander Trevor McDonald, who needed to kick dust at a June in which he went 0-4 with a 5.73 ERA. Or Heliot Ramos, who missed 37 games due to a hamstring injury, and returned a stranger, needing to reintroduce himself to the fanbase and reassert his claim to an outfield spot.

Both starter and outfielder did what they needed to do on Wednesday evening to help themselves and help the team. McDonald threw 6 shutout innings, allowing just one-hit and striking out 5, while Ramos powered the offense with a homer and RBI triple in the 6-4 win.

The only baserunner McDonald allowed was a lead-off single to Ketel Marte in the 4th. He leaned heavily on his sinker (56% usage) to set up his slider and change-up. The offspeed particularly shone — bagging three of his five K’s, generating 6 whiffs on 10 swings. But the major personal triumph of the night: zero free passes handed out. McDonald’s last walk-less outing was his first of the year on May 4th. He walked 13 batters over five starts in June with a 1.73 WHIP. Wild pitches and hit batters exacerbated issues and shortened his starts. Things were sloppy. At times, he looked in over his head, lacking the composure needed to stay afloat in the Majors.

McDonald had that composure on Wednesday when Arizona’s hitters forced him to work. Ketel Marte started the game with an 8-pitch at-bat. He fouled off three pitches, pushed the count to 3-2 before flailing over the top of a slider. Later in the 1st, McDonald put himself in a 3-0 hole to Corbin Carroll before pumping three sinkers into the zone — Carroll didn’t move his bat once. In the 4th with two-outs and Marte on third in a scoreless game, McDonald jumped out to an 0-2 advantage against Gabriel Moreno, who then didn’t bite at any three baited offerings off the plate. Count full, with the threat of Arizona’s pesky offense breaking through once again, McDonald kept challenging the zone, and he finally got Moreno swinging at a change-up after three fastballs.

The very next pitch thrown in the game Heliot Ramos rocketed over the wall in center field.

427 111 MPH off the bat, landing 427 feet from the plate — the shot was Ramos’s sixth of the year, his second since his return from the IL, and also broke-up an impressive scoreless outing by Zac Gallen.

The Giants offense had managed a single single off of Gallen over the first four innings. Ramos’s homer sparked a string of four hits, including a Victor Bericoto 2-run homer. In the 5th, after Gallen recorded the first two outs by way of the K, Rafael Devers worked a walk before Ramos nearly took Gallen deep again with a deep flyball that bounced off the top of the right-field wall and back into play. The RBI triple fueled another series of hits: Jung Hoo Lee pulled a single through the infield to plate Ramos, and two batters later, came around to score himself on Drew Cavanaugh’s single.

A pair of three-run rallies gave San Francisco a six run lead, which proved stable enough to survive a barrage of singles and some general defensive sloppiness at Ryan Walker’s expense in the 8th. Dylan Smith mopped up the mess and Caleb Kilian turned in a stress-free 1-2-3 9th.

The Giants have been done in by the desert, lost and lifeless as they’ve wandered in the unbroken heat. Nine games in, dehydrated and down-trodden, this team finally found a slice of shade.

A minor relief — but that’s what this team is playing for.