Barry Zito gave up four hits and two runs and got the win for the Giants. Zito threw 28 strikes out of 35 pitches said he was happy with his first spring outing.
Emmanuel Burriss, Nate Schierholtz, Brett Pill and Joe Panik each had two hits for San Francisco.
Ted Lilly struggled as he allowed five runs, including two homers, in two innings for Los Angeles.
"I'm not so much concerned, just not happy with the outcome," Lilly said.
Andre Ethier homered for the Dodgers.