Billy Reid, 21, punched a man who fell to the ground after the victim approached him over a stolen bicycle.
The victim was threatened, punched on the head and stabbed on the body to his severe injury and to the danger of his life.
Reid also presented a knife at a man and woman on Ferry Road on the same day.
But following his sentencing at the High Court he was freed from detention in May last year.
He appeared at Edinburgh Sheriff Court earlier this year and admitted the reset of a pedal cycle and an assault by punching, committed on May 2 this year at the city's Craigleith Retail Park.
Reid was brought back to the High Court in Edinburgh for a judge to consider whether he should be returned to prison to serve the remaining part of his unexpired sentence imposed following the knife attack.
Lord Ericht ruled he should serve the entire outstanding 181 days. Any sentence imposed by a sheriff for the punch attack and bike reset will be served from the end of that term.
The judge told Reid: "When you last came before me I sentenced you to a period of imprisonment in relation to two knife offences and in particular a very serious offence of violence. All the knife offences and violence took place in a public place."
"You have had an opportunity to reform yourself and behave well after your early release and you have not taken up that opportunity," he said.
"You have committed another offence of violence against a member of the public in a public place," said Lord Ericht.
The judge said the public required to be protected and told Reid, a prisoner in Edinburgh, that he was returning him to jail to serve the whole unexpired part of his earlier High Court sentence.
Defence solicitor advocate Iain Paterson said that following his early release Reid had returned to live with family in the Dumbiedykes area of the city and secured work as a labourer.
But he said Reid subsequently obtained the bike from a friend and the punching assault took place when the owner of the cycle approached him.