I guess I will put in my two cents worth here. I work as a telephone technician, I am the guy who shows up when your phone or internet doesn't work, so I get to see and deal with lots and lots of dogs. Very often the owners aren't home or the dog is at a location other than the customers home. Telephone trouble can be anywhere between the customers home and the source miles away.
My experience with dogs is that shouting at or speaking to the dog doesn't help and usually makes the dog more excited. Can't tell you how many times people that couldn't be home have told me on the phone, "the dogs name is Sparky, just call him by his name and it will be ok." How many times has calling the dog by his name helped? Zero. So, remain silent, verbalizing will only amp the dog up. If the dog will respond to verbalizations, it was never a threat in the first place.
If a dog charges aggressively toward you, stand up straight, chest out, facing almost directly at it but at a very slight angle. Take one step and only one step toward the dog. Look at the dog, but do not look into its eyes directly or stare it down. Do NOT verbalize. Important, head up, chest out. Try to remain clam and project an aura of calm power. When you do this, watch the dogs demeanor, 99.9% of the time you will see a change in its attitude. Usually you will see its hindquarters drop slightly or a change in ear position as it slows its approach. If you do, what I have said and the dog doesn't alter his approach or aspect, you are probably in deep doo doo and all options should be on the table.
If the dog does alter its approach, you very probably don't have a truly viscious dog on your hands. However, you aren't out of the woods yet. Never turn your back on a dog that has charged you, it will try to bite you the moment your back is turned. Try to remain calm, don't try to leave immediately, stay facing the dog for a minute, then slowly calmly back away while still remaining in an upright assertive posture. Always face the dog. Once you get backed away far enough the dog will usually disengage and you can then leave.
If you are charged by more than one dog at the same time, you are in deep doo doo. Dogs are pack hunters and one of them will try to get behind you and attack you from behind while the other keeps you distracted from the front.
Pepper spray is good and I have used it on several dogs to good effect. That being said, you can't count on it, as I have seen a couple of dogs that acted like I was spraying them with candy for all the effect it had.
As for hitting one with a stick, good luck. Try hitting a cattle dog with a stick. These things are fast beyond belief and have been bred to avoid the kicking hooves of cattle. Getting a good hit with pepper spray is hard enough.
I have not found most pit bulls or rotties to be particularly viscious, but due to their size and power you have to nonetheless be especially carefull of the big breeds. I hope this helps. It has worked for me. Your mileage may vary. Good luck.