I learned the hard way. I slowed down a bit, then it took me three swerves before I actually hit the dog fair amidships and the front wheel of my XT 250 folded up underneath me. It was in a railway tunnel, so neither I or the dog could escape very well.
Now, if the dog is making a run for me, I slow right down as far as possible, then when the dog is almost alongside I gas it. That usually stumps them and if they happen to get under the front, your suspension is already decompressed, making it easier to jump the dog if necessary.
Works for me.
Mick