Sharon Pilkington was working at the Costcutters store in Victoria Road, Mablethorpe, when drug addict Kevin Hutcheon tried to grab a handful of £20 notes.
Lincoln Crown Court heard Hutcheon, 35, was in possession of a 12-inch carving knife but Mrs Pilkington did not see the weapon and shut the till on his hands.
Hutcheon fled from the shop with a handful of cash but was caught after his mother telephoned the police and admitted her son had told her “he was going to do something to go to prison.”
Recorder Gareth Evans QC jailed Hutcheon for four and half years after he pleaded guilty to possessing an offensive weapon and aggravated burglary on October 9 this year.
Michael Cranmer-Brown, prosecuting, told the court Hutcheon had entered the store at around midday.
Mr Cranmer-Brown said: “He approached the counter with a bottle of alcohol he appeared to want to buy and as Mrs Pilkington scanned it he lunged over the till with two arms.
“She very courageously shut the drawer injuring his hand. She was shouting for ‘help’ and he had a handful of £20 notes.”
The court heard Mrs Pilkington did not see the knife but it could be clearly seen on CCTV footage.
Hutcheon, of no fixed address, was arrested the next day after his mother contacted the police.
Mr Cranmer-Brown added: “She told them he left the house at 11am after telling her that he was going to do something to go to prison.”
Hutcheon’s mother confirmed her son had issues with drugs and that two kitchen knives were missing from her home.
Terry Boston, mitigating, said: “Mr Hutcheon fully accepts his guilt and feels he deserves to be punished.”
Passing sentence Recorder Evans told Hutcheon: “What you did on October 9 was go in to a commercial premises with a large handled knife.
“You told your mother you were going to do something to go to prison. You were correct.
“A brave woman tried to stop you and stopped you from taking some of the money.”