First of all , yeah you never want to physically hit or discipline your cat.
What we want to happen here is for your cat to associate biting you as unwelcome and bad behavior. When your cat bites, simply say no in a stern voice, remove yourself or your cat from the area, then ignore him/her...