SAN FRANCISCO -- Melky Cabrera hit an RBI single in the 11th inning and the San Francisco Giants beat the Philadelphia Phillies 1-0 on Wednesday, ending a thrilling pitchers' duel that seemed as if it might go on all night.