If an asteroid is found to be at an impact trajectory with Earth you will have many decades of notice. And it turns out that you only need to change its velocity by a very small amount in order to prevent a collision.
Asteroids may be different from one another. If you find an asteroid on a collision course, you may not know what that particular one looks like.