Yelling at a dog to stop it barking - just sounds like you joining in and barking too ie approval and encouragement. Instead try teaching your dogs to bark on command and then to be quiet on command. And if they bark at the neighbour, stop them by calling them back to you and taking them inside or putting them on lead.
Next time it might not be a rock but ratsack - I would still lock the dogs up for their own safety when you're not home but in the garage is probably a bad place. You might want to investigate "crate training" google is your friend, and crate them inside your house instead. Barking inside an uninsulated garage would be like banging on a drum ie louder than if they were not in it. And if the neighbour can bang on the garage - that's hardly fair ie he's provoking and tormenting the dogs. Not good for your dogs.
Throwing rocks is an act of violence. You probably do need to get a restraining order, and you probably do need to keep a written log of incidents with your neighbour. Every little bit helps the police be able to do something.
And I'd be thinking about moving, unless your neighbour is renting, in which case you can complain to his landlord and start the process of getting him evicted. A pity that can't be done with owners, but it definitely can be done with tenants.