Or it's a nasty cockerel? Either way, peck back, fast and hard enough to be uncomfortable, when she (he?) is thinking bad thoughts. Peckpeckpeck, so this chick trots off and reconsiders.
If you are hand feeding, feed on the litter instead, not out of your hand.
Mary