Attacker Matthew Dixie, 20, had been involved in another violent incident in a Chorley car park just three weeks earlier, Preston Crown Court was told, and at the time of both incidents he was on bail for assaulting a taxi driver in September 2020.
He is now starting a 26 month sentence in a young offender's institution.
On July 24 last year Dixie was drinking with his friend in the beer garden of the Poacher's public house in Bamber Bridge when his friend tripped while carrying a drink.
Thunderstorms and heavy downpours of rain predicted to hit Lancashire as Met Office issues yellow weather warning
Video shows man in van wielding weapon in Preston city centre fight
Dramatic reduction in speed limit on major route into Preston through South Ribble
Man killed in late night crash on A6 Chorley Road near Blackrod
Preston man remains in a critical condition as Lancashire Police appeal for witnesses
Prosecuting, Claire Larton said: " The two were drinking outside in the beer garden. On a table adjacent were another group of young men, Kyle Flude, Adam Taylor, Steven Murray and Nicholas Smith.
"It appears as he returned to his table his friend tripped and spilt some of his drink. Words were exchanged between the two groups and a glass bottle was thrown from the defendant's table
"After that glass bottle was thrown both got up from their table and went to the neighbouring table. The defendant said: 'Do you think I'm a d******d?' to the group and the victim did not respond to him shouting abuse."
Mr Flude was then punched by both men before Dixie pulled a small knife out and stabbed him in his shoulder from behind.
An ambulance was called as it was feared the blow may have injured his lung.
The men were later traced in a vehicle.
The court heard three weeks earlier, at around 9pm on June 17, Dixie and the same friend were involved in violence in a multi storey car park in Chorley,
Miss Larton said the victim was waiting for his friend to pick him up, but he was stuck behind a black Mercedes driving "particularly slowly" by Dixie's friend.
She added: " As the vehicle passed him he made comments to the effect that the driver looked too young to be driving that vehicle and that must be why he was going so slowly."
The driver took issue with his comment and stopped and got out, with Dixie - the passenger - climbing out.
The victim was heard to say "I was only joking mate" and tried to calm things down, but Dixie was holding a wooden bat and ran towards him, swinging it at his head.
The man raised his arms to protect himself and was struck on the arm.
The Mercedes then sped away.
Dixie later told police he was in possession of the bat because he had been "playing rounders" and the knife because he was a carpet fitter.
The defendant, now of Hudson Road, Warrington, Cheshire, admits wounding, possession of an offensive weapon and threatening someone with a weapon.
Defending, Anthony Parkinson said at the time he was associating with the wrong people, using cannabis and getting himself into trouble, and added: " It was an incident borne out of bravado in front of people he no longer associates with."
Judge Graham Knowles QC said: "You could have punctured his lung. You, I hope, understand the reality of it. You're no more than fortunate that you're here being sentenced for this offence rather than for manslaughter - which you'd be guilty of on your own admissions if he'd died, as he so easily could.
"It just illustrates how serious knife offences are and how very lucky he is, and how, in a different sense, lucky you are.
"The injury mercifully was relatively slight. "
The Lancashire Post is more reliant than ever on you taking out a digital subscription to support our journalism. For unlimited access to Lancashire news and information online, you can subscribe here.