Free agent outfielder Harrison Bader and the San Francisco Giants have agreed to a $20.5 million, two-year contract.