This is something I have been working on for years! Yes, years.
I even hired a trainer to help. The key is SEE THE OTHER DOG FIRST
but that dosent' always happen. Last night we rounded a corner and
came face to face with a pit puppy, maybe 7-8mos old.
Buddy went crazy and one leg came out of his harness

It was embarassing to say the least. If I see the dog first I get his
attention with look at me and we get past but if he sees the other
dog first a steak would not stop him from attacking! It's really insane.
I tried treats but when he get's into that zone there's nothing I can do
but drag him down the street and curse under my breath.