Hitting

How do you moms deal with your toddler hitting? This week my 2 year old decided to start hitting, kicking, punching, and pulling my hair. For the most part I've tried to just hold his hands and say no hitting over and over. Even tried "crying" to show he hurt me but he just laughs like it's a game. I don't really want to use spanking in this situation because it'll just encourage the hitting but I'm not sure what else to do other than what I've been doing which isn't working.