There's a noise you can make that imitates a warning sound made by goats - makes them bounce away every time! Put your lips together and blow a quick, loud burst of air. I had a huge nubian/boer cross that used to stand on his hind legs, as if he would butt me. He stood taller than me! I'd make that noise and he would drop to all 4's and run away. If you make the noise consistently when you anticipate a butt, they tend to give up the idea. And of course, no pushing back on their heads!