You've come to the wrong place if you're looking for a peaceful solution ;-). The best way to stop them is to kill them, or trap them and truck them 40 miles away and let them loose (which is just another way to kill them and salve your guilt--they won't last long in a foreign territory with other unfamiliar, competitive squirrels).
Seriously, squirrels, mice and chipmunks are problems for just about everyone with trees outside.
Best solution I've come up with is to work with very large trees that can't be knocked off shelves and have considerable soil volume in their pots.
The smaller the tree, the more damage is done. The less soil there is, the quicker it is all dug out.
The soil you use can make some difference. Sharp particles, like crushed granite, and pumice can cut and abrade their paws. Sometimes they will avoid soil with those components.
Mostly though, they get used to it, just like they get used to all kinds of deterrent tricks, like fake plastic owls, shiny aluminum pie pans tied to stakes to wave in the wind, water sprinklers on motion detectors, etc.
Good luck.