The Giants hit six home runs, including three from rookie Mike Yastrzemski, and beat the D-Backs 10-9 in 11 innings.