A dad who hit his teenage daughter on the head with a German beer mug, leaving her with a "nasty" gash above her eyebrow, has been spared jail.