It happened at the store on Carleton Avenue in Central Islip Thursday night.
Police say Michael Zimmerman walked into the store carrying a giant branch, demanded money, and then started beating the clerk with the tree.
The employee finally fought him off and chased him into the parking lot.
He was stopped by an off-duty police officer who was driving by at the time.
Zimmerman, who is from Ronkonkoma, was charged with Attempted Robbery 1st Degree.