Safety Note: Brake line repair involves critical safety elements. It's possible to undertake in a home setting, but for reasons of safety and liability, we don't recommend non-professionals attempt it.
There are times when a small portion of the brake line gets rusted, or fails, where you can easily cut it out and install a new piece. There are also times when the brake line adapter, that connects it to the brakes, fails and needs to be replaced. Working on brake lines, even though they are under pressure, is well within the skill parameters of a backyard, do it yourself mechanic.
Step 1 - Jack Up Car
Depending on where you need to make the repairs, the front or the rear tires, you'll need to jack up the car in that area. Always park the car on flat, level ground and use jack stands on the axles to make sure the car does not fall while you are under it. Remove the tires so you have easier access to the brakes and the lines.
Step 2 - Check out Damage
Once the car is lifted off the ground you can inspect all of the brake lines to make sure they are all good. Find where the problems is with the adapter and clean it off of any excess fluid or dirt.
Step 3 - Cut off Damaged Area
When you replace the adapter you are going to need to replace the brake line that is connected to it. Go back at least 6 inches and use your tube cutter to cut off this portion of the line.
Step 4 - Cut New Piece of Line
Measure out a new piece of brake line and cut it out with the tube cutter. You will want to subtract 1/2 inch off the replacement piece to make room for the compression fitting that is used to join the two pieces.
Step 5 - Install New Adapter
Take the new adapter and place it on the brake assembly where the old one was. Connect with a compression fitting that is supplied.
Step 6 - Graft in New Line
Slide the cap of the compression fitting onto the brake line that is on the vehicle now. Slide the small ring onto the brake line and then press the barrel of the compression fitting as far as possible. You will then place the new brake line portion onto the compression fitting and tighten the nut on the barrel with your hand. Once you have gotten it as tight as you can with your hand, you will only need to give it another turn with a wrench to make sure it is tight enough.
Step 7 - Bleed Brakes
Whenever you do any work on your brake line you will need to bleed it of any air. Simply open the bleeder screw located on the rear of the brake assembly. Keep it open until you start to see a steady stream of brake fluid. This means that the line is not full of fluid and not air. Fill the reservoir with brake fluid and continue bleeding all the brakes.
Step 8 - Test
Put the tires back on and lower the car to the ground. Take it for a drive to see if the brakes are now working correctly without any "squishy" feeling.