You need to hold her very firmly with considerable strength when she starts hitting you. Wrap your arms around her and lift, holding tightly. There is no way an adult can't physically overwhelm a six year old this way.
Tell her you "won't let her" hit you while you're doing this. Don't let her go until the episode is over. Pay no attention to efforts to bite, scratch, or pull hair while you're restraining her. Don't address yelling or screaming.
She's doing this partly because your attempts to stop her have not been effective. You have given her no consequence to consider before hitting you. To her, the cost-benefit analysis comes down on the side of benefit to her. She gets to release some feeling she's experiencing and enjoy a sensory experience.
When she's calm one day, you can work on getting her to describe the different stages in the build up to an episode of rage. You can offer her support in stopping the process before it gets to crisis level. You can reinforce the message that hitting hurts others and means people don't enjoy her company.
A system of different cards or colours might work in helping her find a better way to manage feelings - green means she's fine, yellow means frustration, orange means she's becoming overwhelmed, red means she's really angry and needs time alone to compose herself.
The 'time alone' response to feeling angry needs to be trained as the only acceptable alternative to the "having strong feeling -> hit mum or dad" progression. The time alone option means time alone without any annoying interaction, time alone for mindful breathing, time alone to get the feelings into words. Finding some sensory items that help to calm her might be very useful.
She needs to be taught to observe and express physical feelings such as hunger, tiredness, and discomfort. Also emotional feelings - anxiety, frustration, happiness, excitement, sadness, loneliness, exasperation, anger, fear.
When she engages with the process of identifying feelings and trying to control herself, comment positively on her efforts.