Everyone makes mistake once in a while, and filling diesel in your car gas tank is just one of those moments, you can't avoid. Although the hand pump of the diesel in a gas station is designed to be slightly bigger to avoid mistakes by users, you can still be able to fill diesel in your car gas tank.
Depending on how much diesel you had already pumped into your car gas tank, there are only a few options available to you:
1. If you caught your mistake early on, and you only filled a few litres of diesel Into your car gas tank, you could fill the rest of the gas tank with gas/petrol. I have done the same mistake in the past, and I continued filling my car gas tank with petrol afterwards. Then i started my car and there was no problem at all. The diesel will flush itself out during the course of time. This is only possible if the amount of diesel you filled in is very less.
2. If you happen to actually fill the entire gas tank of your car with diesel, then you need to be cautious and not run your car at all. Doing so will allow the diesel to run into your car engine, fuel system, injectors, filters, and spark plugs. This will damage those car parts and cost you lots for repairs.
Instead call a towing company and have your car towed to your car mechanic if you can. Otherwise have it towed to your home, use a siphon pump and remove all the diesel till there are nothing left. Now, refill the car gas tank with gas/petrol and run your car now. You will notice great difficulty in starting your car and you may smell weird stuff coming out of your car exhaust. That is just the diesel being removed completely from the system.