best advice I ever got was.....
Duck!
I think the best thing you can do is not make an issue of it. Do what you need to do to protect yourself or anyone else when the hitting starts. Obviously you want to try to stop it before it gets to that point, but if you could that all the time or if it was easy, you wouldn't be here asking for advice.

My approach is to say - I don't like to be hit. It scares me. I'm afraid you will do it harder or that you might really hurt me. And then offer alternatives, depending on the situation. Do you feel like hitting? Are you very angry now? Here is what you can hit. Here is what you can do to express your anger and frustration.
Sometimes it's more of a game and then I might institute some kind of pattycake - high five - hand slapping game where you really get a good noise going.
We don't use timeouts, but I will restrain her arms or hands gently to protect myself and I will remove her if she is hitting someone else. I try to use gentle words like - I won't let you hurt __ name or I won't let you hurt me or I will help you to stop.
I don't force apologies, but my experience is that once a child has calmed down they are really searching for something to do to make amends. (I'm dealing with a very verbal 3.5 yo now - so....). I will go to my child privately and say something like - that was really scary and I know you didn't mean to hurt name___. When you're ready you could go over to her and give her a hug and say you are sorry.
Sometimes she protests how it wasn't her fault and sometimes she does say sorry. It's important to me that I not make her feel worse than she already does. She knows (by now) that it's not good to be out of control, but she can't always be in control (me either!). So I want her to feel safe with me when she's regained control not further shamed. My daughter has already internalized the shame, she doesn't need me to make her feel worse.
When she protests or won't say sorry I think it's usually because she feels blamed. So we try to talk about what's going on. And this is where the long term investment comes in. I drop the issue of sorry at this point. But I think it's setting us up for real apologies in the future.
And as a word of warning for everyone reading this - our "threes" are way worse than our "twos" ever were. It's a very difficult time for me right now with a LOT of emotional drama.