I am not sure what you mean by a garden. Do you mean the yard, or do you mean a vegetable garden? And how old are your birds.
If they are chicks, you can put them in the vegetable garden once it is fairly established, cause they are too little to scratch things up. One summer when I got some late chicks, I would carry them in a cardboard box to the fenced garden, they would hide out under the beans and eat baby grasshoppers, I just put the box on its side, and at dark, they would all be back in the box all huddled up, and I took them back to the garage.
But if they are even 8 weeks old, they will demolish even an established garden. However, if you want to move a flock, get a long stick that you can tap the ground with, open the gate, and throw a little scratch well inside the gate. Position yourself outside the fence so that the hens are between you and the gate. Then reach out and tap the ground and slowly take a step in the direction you want them to go. The trick is not to rush, but move a step at a time, the birds will naturally move away from you, getting closer to the gate. If one starts in the wrong direction, just tap the ground in front of her, and I always say "hut, hut". When they stop moving away from you, take another step, but not until most of them stop. They again will move toward the gate, and then one will see the treat, and you have got it. The trick of doing it fast, is to do it slow! Many people try and hurry and it just flusters everyone.
Or another way, is EVERY time you feed them take the same colored bucket, shake it and call "Here chick, chick, chick" and with a few days, they will all come running.
Mrs K