After having some great outings during a roller coaster 2018 season as a Yankees starter, reliever and farmhand, righty Domingo German went to spring training this year as a backup plan.

The Yankees’ rotation was set if everyone stayed healthy, so best-case German would be battling rookie Jonathan Loaisiga, the organization’s No. 1 pitching prospect, to be the emergency sixth starter, perhaps while pitching in Triple-A.

Meanwhile German certainly was in the bullpen mix for an Opening Day roster spot, but righties Luis Cessa (out of options) and Tommy Kahnle (standout 2017 season) probably had legs up on spots.

What’s happened since has been hard to believe. Injuries led to German opening the season and staying in the Yankees’ rotation, and the 26-year-old has responded by putting up All-Star caliber numbers while racking up more wins than anyone in the majors.

In eight games, seven as a starter, the skinny Dominican amazingly is 7-1 with a 2.70 ERA with 44 strikeouts and 14 walks over 43 1/3 innings.

What German’s secret to success?

“I think he’s a little bit more mature, more confident,” Yankees manager Aaron Boone said before Monday’s series opener against the Baltimore Orioles was postponed due to a drenched outfield at Yankee Stadium. “He’s understanding really well his strengths. And he’s got the ability with three pretty good major league pitches with the fastball, the breaking ball and changeup.