Groundhogs can move up to 700 lbs of earth a day. This disturbance in the earth is actually very beneficial to recycling and cultivation of nutrients in the soil. Gardens also tend to be prime location for destruction. In this respect, a 3-4 foot fence installed above ground with several inches buried into the border can solve the problem as well as installing a single strand electric fence. To rid your yard entirely of groundhogs, scare tactics can help such as a scarecrow or things that blow with the wind.
Groundhogs have an incredible sense of hearing and smell.
It is their smell that they use to locate partially opened or empty dens.