Town made the early running and Andi Thanoj tested the City defence with a well struck free kick,while for York,Kane Felix was posing a threat down the right flank.
In a fierce first half, which was anything but friendly,Referee Mark Sowerby had to award four yellow cards.
The portly,Richard Brody,in particular aroused the home crowds ire after several clashes with Louis Swain.
But it was Brodie who had the last laugh after twentyone minutes,when his through ball found Reece Thompson, who gave City the lead with a cross shot past Peter Crook.
It took Town only four minutes to redress the balance when a delightful cross to the far post by Dom Knowles was headed in by the prolific,Jordan Robertson.
Knowles then went close with two shots across the face of City’s goal,while City’s Brodie skied well over Town’s bar into the hospital car park.
The half ended with Tom Platt directing Lloyd Kerry’s pass into the path of Andy Gascoigne who then lashed a rasping drive just wide of the far post.
Town kept up the pressure after the break with Gascoigne curling just wide after Tom Platt had chested Lewis Turner’s centre into his path.
Town appear to have found a new free kick specialist to don the mantle of the departed,Brendan Daniels,when Andi Thanoj rattled the angle of bar and upright from thirty yards,in the fiftysixth minute.
However,he surpassed himself five minutes later when his free kick from twenty yards out,sailed past past Luke Simpson’s left hand into the top corner to give Town the winner.
Town continued to push forward,as a York team containing several trialists struggled to land a blow.
Platt headed a Turner cross over the top,while sub John Paul Pitman, did well to keep the ball in play and centre for fellow sub,Chib Chilaka to head against the upright.
Town almost increased their lead in the final seconds when Luke Shiels connected with a Joe Leesley corner,only for Simpson to pull off a point blank save.
Report by John Harrison
Photography by Craig Hurle