PHILADELPHIA — Freddy Galvis has a handwritten note stuck on his locker reminding him to keep the ball out of the air.

There’s no signature. It’s simply inscribed “#No. 20.”

Even Mike Schmidt (yes, The No. 20) could agree that if Galvis does put the ball in the air, it may as well soar out of the park.

Galvis continued his home run surge, hitting his 19th of the season to lead the Philadelphia Phillies to a 6-2 win over the Pittsburgh Pirates on Wednesday night.

Galvis connected on a two-run shot in the second inning off Steven Brault (0-3) for his 10th homer in the last 32 games. Known more as a defensive whiz since taking over for Jimmy Rollins at shortstop, Galvis has been a bright spot offensively for the Phillies. He already has career highs in doubles, homers, extra-base hits, RBIs and stolen bases, though his .239 average and .271 on-base percentage need considerable improvement.

“I don’t know if I’m surprised,” he said. “All I know is, I put in a good workout in my offseason and worked really hard to prove I could play baseball every day.”

The 26-year-old switch hitter changed his approach early last month after a session with hitting coach Steve Henderson. Galvis kept all his weight on his back leg during his swing and suddenly found the pop that was missing.

Galvis had 20 career homers in 322 games entering this season.

His newfound power could be enough to overcome his measly OBP.

“I remember a few years when Jimmy Rollins didn’t hit a whole lot,” Phillies manager Pete Mackanin said. “You can live with a guy like that.”

Tommy Joseph hit his 19th homer for the Phillies. Jeanmar Gomez got the final two outs of the ninth for his 37th save.

The Phillies won two of the first three in the four-game series and all but knocked the Pirates out of the hunt in the NL wild card. The Pirates were six games back entering Wednesday and appear set to have their playoff streak end at three seasons. They had the second-best record in baseball behind only the St. Louis Cardinals from 2013-15.

Brault allowed nine hits and five runs in 3 2/3 innings. He remained winless in seven career starts.

The Phillies have long been out of the playoff picture and — like so many teams playing out the string — are looking for any kind of positive to end the season. Galvis has been one. Joseph showed power in his rookie season. Speedy rookie outfielder Roman Quinn has been solid in September.

Quinn even threw out a runner at the plate in the ninth to snuff a Pirates’ rally.

“We had two outs to play with,” Pirates manager Clint Hurdle said. “We made a bad decision there.”

The Phillies got a rare boost on the mound from righty Jake Thompson (2-5). Thompson, who won for the first time since Aug. 12, allowed six hits and two runs over six solid innings.

Against the Pirates, he was sharp enough in front of a small and lifeless crowd to show how he went 11-5 in the minors this season and was considered valuable enough to be included in last year’s Cole Hamels deal with Texas.

Andrew McCutchen hit his 21st homer for the Pirates.

STRIKEOUTS ARE BORING

Double-A Reading OF Dylan Cozens won the 2016 Joe Bauman award as minor league baseball’s home run champion with 40. The award is named for Bauman, who set a professional record in 1954 with 72 home runs for the Roswell Rockets of the Class-C Longhorn League.

OPENING UP

The 2017 schedule was released on Wednesday. The Pirates will open April 3-6 at Boston in their first trip there since 2005. The Phillies open the season April 3 at Cincinnati.

FLASH A SIGN

Former Phillies catcher Carlos Ruiz, traded last month to the Dodgers, thanked fans with a sign of appreciation on a billboard off I-95. The billboard read: “I loved playing for you. You will always be in my heart. Thank you, Philly! – Chooch”

STREAK SNAPPED

Phillies LF Tyler Goeddel singled in the second inning to snap an 0-for-21 streak.

UP NEXT

Pirates: RHP Chad Kuhl (3-3, 4.09 ERA) will make his 11th career start. He’s lost each of his last three decisions, though the Pirates have won seven of his 10 starts.

Phillies: RHP Jerad Eickhoff (10-13, 3.73 ERA) has pitched six innings in each of his last five starts and six of seven overall.