I don't "leave my cat outside" at all, he takes himself out & gets himself back in! If he was outside all day, that would be his choice. Last year my neighbour was having trouble with cat mess in his garden (although he said he didn't think it was my cat), so I bought him a 'Super Soaker' water pistol and told him to fill it with cold water & a splash of vinegar & he should squirt my cat with it whenever he saw him. It only took a couple of squirts, and my cat skirts his garden completely (on his way to the field) now - they don't like being wet & the smell of vinegar makes the cat think he's being sprayed by a tom so they steer clear. Alternatively, you could use your own urine...
Simple solution, doesn't hurt the cat, deters them from your garden and you get the satisfaction of 'shooting' (squirting) them.