Dodgers general manager Farhan Zaidi is leaving Los Angeles to become the Giants' head of baseball operations.