SAN DIEGO — Tony Vitello walked out of Petco Park’s visiting clubhouse with bare feet and wet hair.

The last time Vitello found himself sitting in a cart before Monday night was on a trip to K-Mart during his childhood. Vitello recalled that, as the youngest sibling, sitting in the cart typically wasn’t ideal. This night, though, was an exception.

It’s tradition in baseball for players to bask in beer showers after significant achievements, the most common being when a pitcher records his first win. The Giants’ players extended that tradition to their manager following their 3-2 win on Monday night at Petco Park, the first victory of Vitello’s major league managerial career.

Usually, it’s rookie players who find themselves in the cart. On this occasion, it was the rookie manager.

“There were adult beverages, but there was some other stuff mixed in, too. So, at some point, I’ll be plotting my revenge,” said Vitello, who amassed 341 wins over eight seasons at Tennessee.

“It was fun, but he was a good sport about it,” said third baseman Matt Chapman. “It’s kind of a rite of passage.”

The Giants’ collective preference would’ve been for this moment to happen in San Francisco at Oracle Park in front of their home fans against the Yankees. That scenario didn’t materialize as they were swept on their home turf.

San Francisco’s offense took deserved flak after scoring just one run in their first three games, but the Giants were outplayed in every facet of the game. Vitello, himself, had his share of curious decisions, one of the most significant being to allow left-hander Ryan Borucki to pitch to (and allow a home run to) three-time MVP Aaron Judge.

Their flight to San Diego, then, was not of the happy variety. With one momentous swing, the team found equanimity.

The Giants had only scored one run in their first 29 innings of the season when Harrison Bader stepped to the plate in the top of the third, the only team in the majors that had yet to homer. Bader changed that by turning Walker Buehler’s 1-2 knuckle curve into a 408-foot, 107.3-mph solo shot that gave the Giants a 1-0 lead — their first lead of the Vitello era.

“Bader had said some things before the game. Nothing like, ‘I’m going to hit a home run,’ but (with) just some of the talk, all of the guys were saying it’s fitting that he hit a home run,” Vitello said.

Vitello recalled that there were some comments after Bader’s home run about the team loosening up. To Vitello, there wasn’t necessarily a tightness, but rather an “emotional charge of really wanting to do well.” He referred to a line from the song “Can’t Tell Me Nothing” by Kanye West off the “Graduation” album (which, coincidentally, is centered around college): “If you try hard, you die hard.”

Bader’s homer didn’t result in an offensive avalanche, but San Francisco’s offense exhibited some much-needed life as Patrick Bailey and Casey Schmitt, who entered the day without a hit, each contributed RBI singles in the fourth. From there, the pitching staff held it down.

Landen Roupp pitched six scoreless innings with seven strikeouts. Left-hander Matt Gage breezed through the seventh, and right-hander Keaton Winn dominated the eighth by striking out the side. Right-hander Ryan Walker allowed a two-run homer to Jackson Merrill but did enough to secure the win and his first save of the season.

This, then, was alcohol-infused catharsis.

“Obviously, we wanted to do it the first day, but anytime you get to have your first big league win, whether you’re a player, coach or manager, it’s special,” said Logan Webb.

“I don’t think we went into today with any pressure that today’s got to be the day, but it’s nice to get it. It’s nice for him to get that first win. Now, it’s kind of behind us, and we don’t have to have people question Tony or anything like that. Now, we just get to play baseball and go out there and win.”

The beer shower was only one part of what made the postgame celebration for special for Vitello.

Shortstop Willy Adames, with whom Vitello bonded during a January trip to South Korea, shared words with the clubhouse. Chapman, who talks after every win, did as well. The one orator Vitello especially wanted to highlight was Jerar Encarnacion, whose speech was “subtle” and “in a different way.”

“Getting to put him through what I got put through after my first win was pretty cool,” Roupp said. “I don’t know if he liked it or not, but we definitely enjoyed it.”

“Some of these guys have been a little slower to come out of their shell with me, but it’s little moments like that — or breaking camp or Opening Day — where the bond grows a little bit,” Vitello said. “At the end of the day, we want to be a strong unit. But I told somebody … I really get a sense like no matter what happens, this group is going to get a lot closer as the year goes on.”

The Giants, in all likelihood, do not have another beer shower in store for Vitello’s second, third or fourth win. By the end of Tuesday night, Vitello’s hair will likely be dry and his shoes will likely be on his feet. If this group can stack enough wins over the next six months, they’ll have the luxury of swapping beer for champagne.