 He enjoyed the best season of his career in 2017, posting an ERA of 1.99 in 68 games.In 2018, he was 1-1 in 30 innings for the Giants.On July 8, 2018, Gearrin was traded to the Texas Rangers along with Austin Jackson and minor league pitcher Jason Bahr in exchange for a player to be named later or cash considerations.