Gareth Hanson, 18, told his ex girlfriend he was coming over to her new partner’s house, after she told him she did not love him and wanted a new relationship.
Hull Crown Court heard Hanson cycled a mile and-a-half to the Bull and Sun pub, covered his face with a scarf and began making threats with a knife, on November 21 last year.
Crown barrister Stephen Welch said: “The defendant then approached the victim who noted that Mr Hanson had in his possession a small knife.
“The defendant lunged at him - telling him he wanted to fight with him. The complainant did not want to fight and feared for his own safety.”
After fleeing the scene, Hanson sent a text to the girl saying: “I’m sorry. I love you.”
He was arrested in the early hours of the following day.
During police interview, Hanson said he recalled meeting the victim, but denied having a knife.
“Once he was confronted with video evidence he admitted having the knife and being angry with the complainant,” said Mr Welch.
Hanson, of Holyrood Avenue, pleaded guilty to possession of a knife in a public place to cause a person to fear immediate risk of harm.
He also admitted a public order offence.
Two weeks before the incident, Hanson had been ordered to complete a rehabilitation order after admitting aggravated vehicle taking by stealing his father’s car and crashing it into a property on High Street.
He had no insurance or licence and failed to stop - he was given a 12-month ban.
The court heard Hanson had only turned up for four of nine appointments for his community order - failing to offer acceptable excuses for two of them.
Paul Norton, mitigating, said his client suffered with attention deficit disorder, extremely limited cognitive skills, extremely poor decision making skills and a mental capacity much lower than normal for his age.
At the time of the incident, Hanson had not been taking his medication, which had a calming effect on him.
Sentencing, recorder Andrew Dallas told him: “Knife crime is something the public are extremely concerned about.
“Parliament takes a tough stance on knife crime, and the public demands from the courts stiff penalties.”
Hanson was sentenced to 146 days in a young offenders’ institution.