The best thing for car owners is that they may realize the mistake at the earliest. You realise your mistake before you start filling, you go scot free, and during filling, you still save your car. Instantly stop fuelling the tank with the wrong fuel and calculate the percentage of the wrong fuel. Do not turn the engine on, and take the key out of the slot without any delay.
Twisting the key in the slot means pumping the wrong fuel into the engine power producing systems. Diesel in petrol tank does not let the engine start. Take the car aside and call someone for assistance. Draining the wrong fuel out of the tank is possible and does not cost much. It will take some time, but you can instantly take the car back on the road. It is the best solution for the wrong fuel in a car tank.