I did my final paper on this for my gardening class

In addition to the above suggestions, I would suggest plastic forks (or sticks) placed every few inches, tine side up. No one likes a fork in the butt. Plant all your stuff close, cats like to have room to do their business. Try a wire fence about 5 feet tall. If you know who's cats they are, tell them their pets are in your garden... this usually will not help but then you won't feel bad when you squirt the cats with the hose! If they are feral, call the humane society to see if you can get some traps and have them haul the critters away. If you have a super soaker and some time on your hands, target practice is very effective. You could try planting cat nip a distance from your garden to lure the cats away... but like essential oils and orange peels, not all cats will take the bait.
I DO NOT suggest pepper sprays AT ALL. They can seriously harm the animal and you need to re-apply them a lot. Plus, most of them stink and don't you want to smell nice gardeny smells when you are out there?
HTH a little and good luck!