Knicks coach Derek Fisher was attacked in Los Angeles by NBA bad boy Matt Barnes, who drove 95 miles to “beat the s—t out of him” when he found out Fisher was romancing his estranged wife, sources told The Post on Wednesday.The 6-foot-7 Barnes, who now plays for the Memphis Grizzlies, made a fast break from his team’s California training camp Saturday when he was tipped off that Fisher was making time with sultry “Basketball Wives LA” star Gloria Govan in the home Barnes once shared with her. Sources told The Post that Barnes became incensed when his 6-year-old twin sons, Carter and Isaiah, called to tell him that Fisher was at the house. He got in his car and went to the house and went after Fisher,” one source said.“Matt then drove down there to beat the s–t out of him.” Fisher and Barnes were teammates on the LA Lakers for two seasons.

Cops were called, but Fisher left before they arrived, the sources said.

Following the dustup, Barnes, 35, texted a pal that he had not only assaulted Fisher, 41, but also took revenge on Govan, one source said.

“I kicked his ass from the back yard to the front room, and spit in her face,” the text read, according to the source.

A source close to Fisher confirmed the fight, but insisted it wasn’t as one-sided as Barnes claimed.

“Matt came after Derek, but he only had a few scratches,” the source said.

“Derek’s not going to press charges; he’s going to let it go.” Fisher, who declined to comment in detail about the dustup, looked no worse for wear before the Knicks’ preseason game against the Brazilian Paschoalotto/Bauru team at Madison Square Garden on Wednesday night.Govan was planning to file a restraining order against Barnes, sources said.Reps for Barnes and Govan didn’t return requests for comment.The Grizzlies issued a statement saying they were “aware [of] and currently gathering information regarding” The Post’s online exclusive on the incident. It’s not something that’s going to take me away from what we’re trying to do.” Fisher refused to say why he missed the team’s practice on Monday, which the Knicks had tweeted was “due to personal reasons.” LA court records show Barnes filed for divorce in January.Asked how he felt in the wake of the fight, Fisher said, “My state of mind — like I talked to the guys a few minutes ago — is personal, and private matters are personal and private. Sometimes, we go through things we can’t or can control. In August, he claimed that he had been dating pop star Rihanna and that they’d gone “past the crush stage,” but she denied it on Instagram.Sources said Fisher began dating Govan, 29, “a few months” ago, and on Sept.