SAN FRANCISCO — Players don’t go on rehab assignments as much as they are exiled. It’s not exactly Tom Hanks curling up with a volleyball in “Castaway,” but it can be a lonely existence.

Extended spring is the Siberia of office cubicles, games played before a handful of fans on remote back fields. Wednesday, Michael Cuddyer laid the groundwork for the Rockies’ victory Friday.

He faced the Angels’ Jered Weaver five times in Scottsdale, Ariz., serving as the ideal dress rehearsal for his return to the lineup Friday.

Cuddyer served as a catalytic force, mashing a two-run double and a home run off Tim Lincecum as the Rockies ended their nine-game losing skid at AT&T Park with a 5-0 win.

“You get the monkey off your back. When you get a lead you are not playing to hold on,” Cuddyer said. “You play to win.”

Given the time, place and the opponent, this is arguably the Rockies’ most impressive victory in 2013. The last time they were here in April, the Rockies were nothing more than bugs on the Giants’ windshield.

San Francisco, whether they admitted it or not, was in their head. But three straight victories last weekend in Denver changed the psychology of what could turn into a juicy rivalry this summer. Starter Tyler Chatwood (six scoreless innings) and Cuddyer assured that Colorado lost none of its confidence.

Credit Weaver with an assist. The former All-Star Game starter has a similar repertoire to Lincecum, even if he’s nearly a foot taller. Both are right-handers who rely on Vulcan changeups and vicious curveballs.

“It should help,” Cuddyer said before the game.

Cuddyer barreled a double in his first at-bat, lining a shot down the right-field line. It scored two runs and sent a message that these aren’t the same old Rockies who have served as a homecoming opponent at China Basin.

“I was trying to be aggressive and score from first on his hit. It’s tough to score here. That ball was hit in a perfect spot,” said outfielder Carlos Gonzalez, who hit his 12th home run in the eighth inning. “It was huge for our confidence to get ahead early.”

With Lincecum gaining his footing, Cuddyer lashed his eighth home run in the sixth inning, giving the Rockies a four-run lead. It felt larger with Chatwood on the mound. Showing fastball command that was rarely present a year ago, the former UCLA shortstop recruit carved up the Giants. The question afterward wasn’t about why he was pitching, but why he didn’t go longer.

“I thought about running him back out there (for the seventh). It was a left-handed inning. He had three three-ball counts the inning before. And his spot was up (in the lineup),” manager Walt Weiss explained. “I took all those things into consideration. And Josh (Outman) came in and did an outstanding job.”

On a night when Roy Oswalt made his Double-A Tulsa debut, showing he could be a potential upgrade for the rotation in June, Chatwood made a resounding statement. He threw 59 strikes in 88 pitches. He allowed four singles and walked just one. He lowered his ERA to 1.90 in four starts, and has not allowed a run in 12 innings on the road.

“The key is focusing on the glove and not trying to do too much,” Chatwood said.

He also benefited from terrific defense. Part of the decision to insert DJ LeMahieu as the starter at second base was to give the Rockies one of their best fielding infields. Nolan Arenado put on a show with three Gold Glove-worthy plays — charging a slow roller, and twice throwing off balance on groundballs to his right.

“He’s been huge. It’s fun watching him make plays,” Cuddyer said. “He made three tonight that were like, ‘are you kidding me?’^”

The Rockies have long said they will hit. But if they pitch and play defense like they have this past week, they become extremely dangerous in a wide-open division race.

Troy E. Renck: 303-954-1294, trenck@denverpost.com or twitter.com/troyrenck

LOOKING AHEAD: COLORADO AT SAN FRANCISCO

Rockies’ Juan Nicasio (4-1, 4.47 ERA) vs. Giants’ Barry Zito (3-3, 3.91),

2:10 p.m. Saturday, ROOT, 850 AM

The Giants’ recent dominance over the Rockies featured many layers. Perhaps the most confusing was how Barry Zito had his way with the Rockies even as he slumped against the rest of the league. In their last meeting, the Rockies finally beat Zito for the first time since 2008, a streak spanning 10 games. The left-hander mauled the Rockies in a shutout early this season at AT&T Park. Juan Nicasio looks to build off his best start of the season, which temporarily quieted talk of a demotion. Nicasio showed more trust in his slider and could be paired with catcher Yorvit Torrealba again.

Troy E. Renck, The Denver Post

Upcoming Pitching Matchups

Sunday: Rockies’ Jon Garland (3-5, 5.19 ERA) at Giants’ Matt Cain (3-2, 5.12), 2:05 p.m., ROOT

Monday: Rockies’ Jhoulys Chacin (3-3, 4.10) at Astros’ Bud Norris (4-4, 3.86), 12:10 p.m., ROOT

Tuesday: Rockies’ Jorge De La Rosa (6-3, 3.40) at Astros’ Jordan Lyles (2-1, 5.40), 12:10 p.m., no TV