I'm trying container gardening again this year after taking a 2 year hiatus. I've never been successful because my vegetables were always raided by squirrels. Either they would dig up the plants before they were barely started or they'd steal what did grow. If they didn't steal it, they would leave the tomato or cucumbers on the vines, but take a bite out of each one.
This year I'm trying to grow yellow squash, cucumbers, basil, green peppers, radishes, sunflowers, daisies, johnny jump ups, and asters. When I first started I kept the various containers inside until the seedlings had a pretty good start. I thought while they were indoors, they'd be fine. Instead my cat would pull the plants out of the dirt and leave them beside the pots like so many dead corpses.
I've had the plants outside for a few weeks now. When I first put them out, I put a few pieces of hair in each pot. Someone told me the scent of human hair would keep the squirrels away. Umm, not so much. They left the plants alone for about 3 days and then dug in each pot. I was able to save most of the plants. I lost a lot of the johnny jump ups, all of my daisies, and all but one yellow squash plant.
Desperate, I googled how to squirrel proof a garden. One of the first remedies I came across is putting coffee grounds in the pots. Since I drink coffee every morning, coming up with the grounds isn't a problem. I put a few grounds in each pot, around the rim of each pot and on the porch floor near each pot. Guess what it works, but you have to reapply the grounds every couple of days or so otherwise the squirrels do come to visit.
So if you're trying to garden and are having squirrel problems, give your plants a little coffee. It helps the composition of the soil because coffee grounds have nitrogen which improves the soil structure. It also helps keep away snails and slugs if you have problems with them too.