There are several ways to keep your cat from using your garden as a litter box. The first two are a bit drastic, but 100 percent effective:
1. keep your cat indoors
2. get rid of of your cat
But if you want to keep your outdoor cat, you can try these methods:
1. Cats naturally scratch the ground before they do their business, so you can cover the ground with chicken wire, rabbit wire or various other screens and wires (I would avoid barbed and razor wire) so they cannot scratch the ground. They will find other places to go.
2. Spread citrus peals around the ground. Cats don't care for the smell of citrus, so they tend to leave those places alone.
3. If you plant catnip in other areas of the lawn, cats will tend to go for the weed rather than hang around the garden. Cats are, at their deepest core, just a bunch of potheads.
4. Gently spray cats with water when you catch them in the garden. Cats hate to get wet and this will deter them. They may sneak back later and leave a present just because they're mad, but don't like to get muddy either, so this can be quite effective.
5. Conventional wisdom says build a fence high that a cat can't jump over it. However if you actually own a cat you know that if we want to get on the other side of a fence, we will find a way to do it, even if we have to hire a bird to drop us there. Still, if it makes you feel better, go ahead.
6. Plant lavender, rosemary or rue as cats don't like these plants at all and they'll make a pleasant addition to your garden.
7. Toilet train your cat. That way he can flush his own poop and play with the toilet paper, straying into the garden only for pleasure, mischief and general lying around.
Good luck and enjoy your garden-fresh food. And be kind to your kitty.