There are no guarantees that you can 100% prevent a Pit Bull attack.
The reasons are: Pit Bulls are known escape artists, far too many Pit Bulls owners are irresponsible and allow their Pit Bulls to roam neighborhoods freely and unwanted Pit Bulls are being dropped off in neighborhoods and in rural areas. So unfortunately, until BSL is implemented and enforced in your local communities and state these attacks will occur and with greater frequency.
However, there are steps you can take to be prepared and have a high chance of surviving an attack by a Pit Bull.
BE ARMED:
Buy a weapon, a semi-automatic pistol and get your Concealed Carry License (CCW). Regulations differ from state to state, but generally you will be required to take a class and pay a fee for your license.
If for some reason that is not an option for you, carry Mace or bear spray. There are many brands and types to purchase and most can be bought online on Amazon or at a gun shop.
Carry a hunting knife, a stun gun or tazer (check with your state on legal requirements to carry a stun gun or tazer.)
Carrying and using a small fire extinguisher has proven to be 70% effective in stopping an attack.