There are a lot of old wives' tales about putting various things into their burrows, but nothing works for long. These guys are starving. They've been sleeping all winter and they need to eat. As gardeners we put out salad bars for them. They are just doing their groundhog job.
If you have a large dog that can help to keep them away from specific areas, but of course you have to let the dog into that area, which you might not want to do. Other ideas are wire fence buried a foot or more into the ground and electrified.
Farmers who have to deal with this issue end up shooting groundhogs. I know you probably don't want to do it, and in some areas you aren't allowed to discharge a weapon, but there really is no sure way to stop them from eating your garden other than that.