Cats are a nuisance in the garden, and there are lots of ‘solutions’ being offered online to stop them coming in.
However, these are not always effective.
Keeping cats off borders
The best answer is to stop the cats from getting into the garden at all. Cats are creatures of habit and usually enter and leave by the same spot. Try observing where they come in.
If they are coming through a hole in the fence or hedge, block it up. If they are climbing over the fence, you can attach a string 10-15cm above the top of the fence, running along the panel. This makes it hard for cats to balance on the fence panel. Or you can apply a grease like Vaseline to stop them from using it.
If you see the cat in the garden, spray it with water from a bottle or pistol, or even the hosepipe. One bad experience should be enough to deter it from coming back to the garden.
Cats also dislike strong smells – try putting lavender, rosemary, and curry plants in your border. Some people also recommend using cut citrus peel – apparently, it smells too strong for the cat. Rubbing raw onion in places where cats frequent has been said to steer them away. I have never tried it though. Citronella is also said to be effective.
Another thing I would recommend is putting spiky things in the soil around the border. Wooden skewers or prunings from spiky plants like roses may help – cats have sensitive paws.
I would recommend making sure to remove any cat poo from your soil – the smell of it will attract other cats.