I just remember the ending, where, of course, Earth is spared. I think they were using nukes, but I could be wrong. After the rockets hit the object, at first it shows now effect, but then starts slowly altering course. Had an Irwin Allen feel to it, but I don’t see anything obvious in his filmography. I seem to recall at the time it was made for TV.
1970s, I think.