A joint project involving NASA, the US Air Force, and Lockheed Martin has been under development since the 1980s to provide a way for flight control to remotely wrench a plane out of a collision course.
The The Automatic Ground-Collision Avoidance System (Auto-GCAS) would monitor a plane's trajectory in comparison with the terrain under its flight path. If calculations showed that a crash was imminent, and there is no response from the pilot to correct course, an autopilot system would take over until the plane was back to safety.
So far the system has been installed in F-16s — with F-22s and F-35s to follow — and as recently as February, the military reported the first instance of a pilot being "saved" by the system. Though details were not released, the incident was believed to have involved an AirForce F-16C participating in maneuvers against the self-proclaimed Islamic State terror group in Syria.
A video of a test of that technology in an F-16 can be seen below.
While NASA is reportedly exploring the integration of the technology into commercial fleets, it remains unclear that a system such as this could prevent a tragedy like the Germanwings crash. For instance, the Auto-GCAS system allows for pilot override. Though it's possible you could require two pilots to agree for override, airline pilots are notoriously protective of their ability to maintain ultimate control of their planes.