MATHEW Pettit pleaded guilty to using threatening words and behaviour at Stroud Magistrates' Court on Wednesday, August 25.
Pettit, aged 24, of Parliament Street, Stroud was seen on CCTV by officers at Stroud police station at 2.15am on Saturday, July 31.
Prosecutor Theresa Perry explained that Pettit was seen with a big group of men in London Road who seemed to be aggressive.
"When officers got there they found a fight in progress," she said.
"They saw Pettit swing a punch and there was a bit of a tussle."
Ms Perry also explained that Pettit was breaking a conditional discharge he received in June for possessing cannabis.
Defending, Howard Ogden said: "The man Pettit swung a punch at was with his ex-girlfriend.
"He knows he was wrong to do it in the spur of the moment."
Pettit received a 28-day curfew and must be inside from 9pm to 7am every night.
He was also ordered to pay £85 costs.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article