I have also heard that putting a little garlic in their food will keep fleas away
Yes, scientists are still trying to figure out if this is true or not. They tested, and they said that when the dogs had garlic, they didn't get fleas, but this didn't mean that the garlic made them immune, so they are still testing.

But a little garlic wouldn't hurt if you're in for trying something new. But only give them 1-3 cloves. Anymore than that and they could get really sick.