By observing our cats respond to a racoon stealing their food, I learned something. The other day, I tried the same trick on a charging dog. Needless to say, it worked like a charm.
The cats simply turned their back on the racoon. I simply looked the other way when the dog came after me, kept pedaling and stared off into the distant field. Wouldn't you know it, the stupid dog ran passed me and began heading into that field. When he lost interest, he turned and came back at me. By then, I was looking away again, in the opposite direction. The dog ran passed me a second time.
A few seconds later, I was long gone. The dog was left behind, probably confused as hell.