Cole (1-0), taken first overall by the Pirates in 2011 draft, was called up from Class AAA Indianapolis before the game and responded with 6 1/3 solid innings. The 22-year-old right-hander yielded two runs on seven hits, didn't issue a walk and struck out two.
He also delivered at the plate, stroking a two-run single in his first big-league at-bat in the second inning to give Pittsburgh a 2-0 lead.
Pedro Alvarez went 3-for-3 with a two-run homer, three RBI and two runs scored while Starling Marte added a solo shot as the Bucs took the first of a three-game series.
Giants starter Tim Lincecum (4-6) was touched for four runs (two earned) on seven hits in a 4 2/3-inning effort.
Brett Pill and Tony Abreu each provided an RBI for San Francisco.
Aaron Carter is still in love with Hilary Duff
Ray Liotta sues skin care company over use of likeness