If you have a garden, you probably don’t want to turn it into a litter box. That’s why you should find ways to keep cats out of your garden using humane methods that don’t involve you going crazy in the process.
Since cats generally like soft ground, one technique to keep cats away is to sprinkle egg shells around your garden. The egg shells turn into fertilizer and the sharp edges of the egg shells discourage cats from walking around that area.
Of course a better solution would be to get cats that you can train not to mess up your garden, but then that would just be a dog.