On the space.com website, there is an article about the Armageddon movie and the giant asteroid that was threatening the Earth. They calculated that the energy needed by a bomb to destroy the Asteroid would be 800 trillion terajoules — compared with the 418,000 terajoules produced by history’s most powerful blast, the Soviet Union’s test detonation of the Tsar Bomba Thermonuclear Fusion bomb in 1961. That bomb was a 100 Megaton bomb that had parts taken out of it, reducing the eventual yield to 50 megatons. That is nowhere near enough power to destroy such a large Asteroid that is the size of Texas. I suggested that a 1000 megaton warhead might be enough, but a 100,000,000 megaton bomb would be required, possible if you built it in space. But that depends on how much warning you have, using a bomb would only make more little pieces instead of one large Asteroid, but if it is 600 miles across that would not matter anyway. if you had years or decades of warning and you could get to the Asteroid maybe 7 years in advance you could build engines on it and burn the engines for a while and they would push it off course.
That is what they did in the book The Hammer of God, they built the thrusters to push the Asteroid off to a different course. Only a small push would be required to move the object to miss the Earth depending on how far it had to go before striking the Planet. As seen in the movie Contact, they had religious fundamentalists that sabotaged the follow up mission to send a nuclear device to finish off the giant rock, but due to a twist of fate, the craft hit the Asteroid at full speed acting as a Kinetic Impactor, cleaving the peanut shaped Asteroid in twain. That is another way of protecting from a potential impactor that threatens the Earth, but the best strategy is to continue observing the skies for anything that could pose a potential threat so that we may formulate a response to the threat. Unless you had an Imperial Superlaser II, the option of thrusters and nudging the Asteroid off course by flying another object close to the object and pulling on it slightly making it deviate to another course. The Imperial Superlaser II was a laser weapon powerful enough to overcome the gravitational bonding force holding an entire planet together. Speaking of Star Wars here is an interesting article regarding the Imperial Trash Compactor.
Here is an interesting video that shows the effects of a one megaton warhead on an Earth threatening Asteroid. Since a thermonuclear weapon uses a nuclear reaction, it does not require any air to work, despite what retarded Youtube commenters say. The Starfish Prime detonation was a nuclear detonation that occurred 400 Kilometers above the surface of the Earth and it worked perfectly. The Sun uses nuclear fusion without air and it is working just fine all this time. The thermonuclear bomb uses nuclear fusion enabling a massive output of energy. The Starfish Prime explosion created a massive EMP output and auroras in the atmosphere. It also resulted in belts of intense radiation surrounding the Earth which knocked out satellites. So if you want to take out orbiting satellites, use a thermonuclear bomb. The bomb was only 1.5 megatons, if it had been a 100 megaton bomb, it would have been quite spectacular indeed, I am sort of wishing something like this would happen now, it would make an incredible photo opportunity. But we have a nuclear test ban treaty, so that sort of activity is in the past.