Tips and ideas of how to condition your dog not to dig in your garden.
1. Install a sprinkler system and turn it on each time the dog starts digging. Making sure that the dog associates the digging with being splashed with water may prevent further digging. However, less effective if your dog enjoys water, but then at least you found a new game that'll keep the garden safe (and well-watered) at least temporary. If a sprinkler isn't doable, a water pistol can fill the same function.
2. Make sure your dog has plenty of alternatives of activities to enjoy. Digging might be a sign of boredom or anxiety, so plenty of toys, playtime and attention will make for a happy dog and may prevent further digging. It might even be worth considering adopting a playmate in form of another dog. The animal shelters would love to assist you in finding a good match.
3. Give your dog a designated space to dig. This might be very useful to prevent more drastic measures such as fencing off part of your garden or confinement of your dog to a run. (Something I personally would not recommend)
4. Make sure that your dog gets plenty of exercise. Digging is a way to release energy, so daily walks or runs will greatly reduce your dog’s desire to dig, leaving your garden looking lovely and you and your pup in happy and fit!