Oh yeah, raccoons are cute creatures in the wild, but only when they are not tearing up your garden! If you live in rural areas as I believe you do, your yard cannot avoid being trampled by these animals. Fortunately, there are ways to get rid of them without resorting to killing them.
You can place raccoon traps around the garden with baited food. Some animals like to come out at night, so remember to clear the traps in the morning. You do not worry about harming any animal in the process.
You can also install a fence around the garden, but know that not any fence will do. Raccoons are great contortionists that bend, twist and move through the smallest fences. So you need to install an electrified fence that shocks the animals that touch the boards. The shock is normally mild and does not threaten their lives.
Take note of other animals in the area, such as pets. If you choose to build an electrified fence, ensure the safety of animals and humans that pass by it.