After Reymond Fuentes singled, Jose Casilla relieved Petit and walked Jace Peterson to load the bases. Up came Yeison Asencio, who lined a two-run single. Medica, a first baseman who's trying to claim a reserve role on the Padres' Opening Day roster, then delivered his homer.
Medica improved to 8-for-11 this spring by adding an eighth-inning RBI double. The Giants avoided a shutout in the bottom half of the inning when Tyler Colvin lined a two-run single.
Earlier, pitching proved dominant. Starters Tim Lincecum of the Giants and Josh Johnson of the Padres set the tone by throwing two scoreless innings apiece.
"Overall, I feel a lot closer to where I was in 2009, 2010, '11," said Johnson, who led the National League in ERA (2.30) in 2010 while a member of the Marlins.
Up next: Expect center fielder Angel Pagan and catcher Buster Posey to be in the lineup Tuesday against the Rockies at 12:10 p.m. PT. Neither played in Monday's game against San Diego. Also, Ehire Adrianza, who's competing with Tony Abreu and Nick Noonan for a utility infield role, could receive his first spring start at second base. Except for one game, Adrianza has played shortstop throughout his entire Minor League career.
Chris Haft is a reporter for MLB.com. Read his blog, Haft-Baked Ideas, and follow him on Twitter at @sfgiantsbeat. This story was not subject to the approval of Major League Baseball or its clubs.