Oh yah. And solar sails and painting it white would only work with significant lead time on the asteroid. The current expected lead time on an earth impacting asteroid is not sufficient for such methods to work. You would have to detect it years out and have the system you plan on using on the asteroid already ready to be deployed. After all it has to be setup, launched, get to the asteroid, and then deploy whatever it deploys, and only after sufficient time will it alter the path.
For discovering something a few days or months out about all you could do is launch all the earths nukes at it with your best missiles pray, have a party whatever your pick is and hope enough get their to vaporize it. Nukes won't change the path but enough of them in waves can vaporize just about anything. There are advantages to having an internal explosion core temperature that exceeds the temperaturs of the sun.