A teenager attacked a homeless man in the early hours after the pair exchanged words, Lincoln Crown Court was told.
Thomas Dowle had a confrontation with Darren Lewis, 34, outside the Lamb and Flag pub on Lincoln's High Street.
Phil Howes, prosecuting, said Dowle then launched himself forward and punched Mr Lewis in the stomach, knocking him to the ground.
Moments afterwards a second man, Marcin Momenko, joined in the attack and kicked Mr Lewis in the head.
Mr Howes told the court: "Momenko and Dowle then shook hands in a celebratory fashion and walked off."
Mr Lewis, who was living on the streets, suffered a broken tooth and a jaw injury.
Dowle, 18, of Caistor Road, Market Rasen, and Momenko , 19, of Moorland Avenue, Lincoln, each admitted assault occasioning actual bodily harm on August 1.
Justin Atkinson, defending, said Dowle, who has no previous convictions, reacted to being threatened by Mr Lewis.
"It was plainly out of character. He was shocked by his behaviour when he saw the CCTV," he said.
"He was acting on his own. He did not know Momenko."
Dowle was given a 12-month community order with 180 hours of unpaid work.
A warrant without bail was issued for the arrest of Momenko after he failed to appear for the sentence hearing.