Plant onions and garlic around the perimeter of your garden to discourage rabbits and deer from entering. Rabbits generally know better than to eat garlic or onions, which can trigger severe anaphylactic reactions, and even deer seem to find these powerfully potent plants less than appealing.