I've seen a number of suggestions for keeping cats away from your garden, but I must admit I've never needed to try any of them. Anyway, here's a few :
1. Spread broken eggshells around the garden, particularly near likely entrances. Apparently the cat's delicate paws don't like to tread in the area.
2. Leave orange peel and teabags around the garden area.
3. Squirt bleach along walls, fences, gates and paths. The smell will keep cats away. Once they've got used to doing their business elsewhere they are creatures of habit, so won't return.
4. Buy a proprietary pet 'discourager'. Scoot is one that springs to mind, but there are doubtless umpteen others.