Answer: The best way to prevent animal damage is to fence them out of the garden, but you can also try using repellent granules or sprays labeled for the specific animal you are having trouble with. Some gardeners also have success using blood meal in the garden and using pepper wax sprays on their plants. I should also mention groundhogs are unpredictable and can bite so you may want to contact your local animal control authority.
Here is more specific information on different types of problem animals, each entry suggest the best type of fencing and controls.
Good luck with your garden this summer.
Q&A Library Searching Tips