If we're just talking about interstellar objects, and assuming a decent lead time (not oh hey it's going to hit in 3 days), it's probably easier to prevent it from hitting us since it's most likely just passing through. You'd only need to give it a small enough nudge to have it miss a smidge. That's something we're more than capable now of doing, and have done.
We would need to detect it in time, have an interceptor fast enough to rendezvous with it, and also with enough payload to nudge it off course. Seems quite difficult with current technology