You're riding along, sprinting up the trail, when you suck a stick into the rear derailleur. POW! Your derailleur is toast. Believe it or not, it's not difficult to replace the rear derailleur yourself. Before replacing a "bent derailleur" make sure it's not just the derailleur hanger that needs straightening or replacing!
The derailleur will now come away from the hanger.
Thread the mounting bolt into the hanger.
If you split the chain, route it by hand. It goes forward ABOVE the top pulley, down in FRONT of the pulley, around the BACK of the lower pulley, then forward BELOW the bottom pulley. Fix the chain.
Push the derailleur cable through the receptacle on the back of the derailleur. Pull the cable hard to remove any obvious slack. Then relax your pull on the cable and thread it through the cable clamp. Screw in the cable clamp bolt to tighten it down onto the cable.
The derailleur is now installed. But it's not ready to shift gears yet. Next you'll need to set the limiting screws, and adjust the cable tightness. See our section on rear derailleur tuneup .