The SF Giants signed longtime Diamondbacks shortstop Nick Ahmed to a minor-league contract on Monday.