Giants starter Tim Lincecum (1-0) struggled through five innings, giving up seven walks and three hits but just two unearned runs. He also drove in a run to help his own cause.
San Francisco's bullpen was solid the rest of the way, with Sergio Romo notching a save.
The Dodgers' Josh Beckett (0-1) was roughed up for five runs -- three earned -- on six hits.
Luis Cruz had a sacrifice fly for Los Angeles, which was 1-for-14 with runners in scoring position and left 12 men on base.
Teacher apologizes for showing sexual image of herself in class
Senate Democrats to pull all-nighter on climate change