Some common groundhog repellents are ammonia and cat urine-soaked litter. Putting ammonia-soaked rags or soiled cat litter around the garden or yard can repel groundhogs. Placing soiled cat litter in the burrow and loosely sealing is another way to encourage the groundhogs to find another home.
Wire mesh fencing can also keep groundhogs away, but it must go at least 2 feet underground to prevent groundhogs from digging underneath the fence. Most experts, such as the Farmers' Almanac and The Humane Society, recommend trapping and relocating groundhogs to deal with an infestation. However, since the laws differ from state to state, it is recommended to check with the state wildlife agency before relocating groundhogs.