Drain the oil, and refill.
Gasoline being poured into a tank is not a chemical change.
Drain it out again and rinse it out with gasoline.
oxygen + gasoline burns
Assuming you are talking about lawn mower engines, it is located on top of the gas tank. The gas tank is of course where the gasoline is poured into.
drain your tank
Hydraulic fluid should be poured in the oil tank.
Sugar
Mineral spirits should do the trick.
This is called siphoning. The gasoline-filled tube, when the end that is not in the gas tank is lowered to a point below the tank, it creates a pressure differential inside the tube. Just as liquid pours from a glass when it is tilted, so does the gasoline flow through the tube. As long as the tube in the tank is below the level of gasoline in the tank, the gasoline will continue to flow until the flow is interrupted (or until the tank is empty).
.0003 cm
Don't know how much gasoline was put in or how much diesel was in the tank before gasoline was added but if you didn't run the engine after the gasoline was put in and you drained it, you should be okay.
It will stall the engine