Q. How can you tell whether a head of garlic will have a little green shoot inside the cloves?
I don't think there's a reliable way to tell. The green sprout in the middle really is a sprout; it's a sign that the head of garlic is older and is trying to put out a shoot.
The main thing is to make sure you buy heads that are firm with tight cloves and dry skin. Don't buy garlic that looks shriveled or has soft cloves, and don't buy whole heads that have been kept in a refrigerated case (although I haven't seen stores doing that for quite awhile).
The good news is, the green shoot won't hurt you. It can be bitter, though, so you should remove it. It's easy to pull it away when you cut the clove in half.