Woking magistrates were told how Darren Howkins, 23, of Lynchford Road, North Camp, punched the woman twice in the head, after he dragged her into the bathroom.
At a hearing on Friday, the court heard that Howkins and his partner, named in court as Miss Ellis, lived at an address in Watchetts Road, Camberley.
Magistrates were told that during their relationship, which had produced two children, Howkins had been physically and verbally abusive to her on several occasions.
In a statement read to the court, Miss Ellis said that on September 28 last year she had left her flat to drop her children off with family.
After returning home, the door was locked and she banged on the door to get Howkins to open it.
He appeared at the door and said he had been asleep. As she entered the flat she smelt alcohol and an argument ensued over Howkins' drinking.
Howkins became violent when asked to leave the flat, the court heard.
He smashed a large mirror by kicking it before reaching up to a pane of glass above a doorframe and punching through it with his fist.
Miss Ellis claimed this scared her and she headed towards the bathroom.
"I was going to lock the door until Darren calmed down," her statement said, "but he pushed me hard into the bathroom."
Once inside the bathroom, Howkins pushed Miss Ellis into the bath itself, banging her head on the taps.
"He then punched me in the head at least twice," she said. "There was a lot of blood.
"He then walked away from the bath, but I was worried my mum would bring the children back and see me like this.
“He then came back and he starting punching me again. I put my arms in front of my face. I shouted out to him, ‘please don’t’ — I thought if I became upset it might start him off again.”
In mitigation the magistrates heard how Howkins, who admitted assault occasioning actual bodily harm, had become violent after an acquaintance had told him his ex-partner had been seen with another man.
Howkins accepted it was a serious offence and was ashamed about being in court and was extremely remorseful.
Sentencing him, John Lavers, chairman of the bench, said: "We have taken a long time in this matter. Having considered all the evidence, we were of the view that custody is the only sentence.
“This was an unprovoked attack on a person who was in a much more vulnerable position than you.
“For this offence, you will serve one month with a further one month suspended."
The justices considered costs and compensation to be inappropriate in this case.