Another thing that cats don't like is water. When you want to get rid of a cat, try using water on it to make it run away. Just squirting some water from a garden hose or a water bucket will do the trick. Once you've scared the cat a few times by using this method, he'll probably stop showing up. Just keep getting water on him each time he comes and he'll understand that he's not welcomed.
If you want to protect the plants in your garden, then you can try using mothballs, since cats don't stand their smell. You can place the mothballs near garden borders, around plants and near the fence. Besides mothballs, there are a few other repellents for cats, like tobacco, mustard oil, cayenne peppers, lemon grass oil, citronella oil and lavender oil.
One other method of scaring cats that works very well is using devices that emit sound at high frequencies, which humans can't hear. There are a number of options out there that work on this principle. You can choose one that starts when it detects motion and another that keeps doing the noise all the time. Just make sure you check for the area that the device can cover. As long as it can protect the entire garden, it should be all you need to get rid of unwanted visitors.
There are a number of commercial options also, like products that use scents to make the cats avoid going into your garden. However, you shouldn't use such a product in the vicinity of your food crops. It's not recommended because these repellents have a lot of chemicals in them. Look for these products in local department stores.