I like to take my dog with me on my walks, but one of the last few times I had, there were several instances of peoples' dogs running out to bark at us. One even charged, but I managed to keep it at bay by yelling and stomping. I haven't been walking much since because of that. Luckily, it wasn't a pit bull.
My question is, when I'm out with my dog, what can I do to deter these loose dogs from charging and/or attacking my dog or me when we're out. Would some kind of pepper spray be too inhumane to ward off such an attack? I used to carry a large walking stick with me, but I doubt that would stop a determined pit bull. I know these are people's pets because they're wearing collars and they come bounding from the front or backyards. I don't want to hurt the animals because they're someone's pet, but I also don't want my own pet hurt/killed in the process. We rescued her from a shelter, so she's not very aggresive at all toward other dogs.
I thought maybe a cattle prod of some kind...something that would give a slight electric zap (without causing too much pain) but I have no idea where to even find something like that.
EDIT: I'm sorry I've brought up such a sore subject with everyone. I simply wanted to get suggestions on humane deterrents to stop a charging dog. When I said "Luckily, it wasn't a pit bull," I was merely stating that I was lucky because my stomping and yelling probably wouldn't have stopped it. Again, I apologize for ruffling any feathers.