For a PVC Main Line
Locate the main water line and tap into it. Shut off the water to the main line before working. If you live where there is snow you need to connect to a place where the line will not freeze like in the basement or near the house. If the line is underground you need to expose the line.
Expose the main line to the house with a round-nose shovel. If the line is PVC, cut into it with a PVC pipe cutter leaving a small gap to fit a PVC T-fitting. Once cut, measure with a tape measure the inside diameter of the pipe to determine the size of the pipe and T to use
Primer all openings on the the slip T-fitting with PVC pipe primer, a slip T-fitting means the fitting has no threads which means you can just insert the PVC line with glue. Wait for the primer to dry. Apply primer to both ends of the main line and let it them dry. Then apply glue to both ends of the main line and insert both pipe ends into the holes in the T-fitting.
Install a shutoff valve to the irrigation line for emergency shutoff. Cut a 1-foot piece of PVC and primer both ends of the pipe. Allow primer to dry and then apply the pipe glue to the T-fitting and the small length of pipe.
Install a slip fitting shut-off valve, meaning the inlet and the outlet to the valve has no threads. Apply the primer to both sides of the valve and the small length of pipe. After it dries, apply the glue and insert the valve to the inlet side of the valve. Primer the end of the new irrigation line and when it dries apply the glue and insert it to the outlet side of the valve.
Galvanized or Copper Main Line
Cut a small gap in the copper line so a compression T-fitting without a threaded opening, a slip fitting, can fit into the gap. A compression fitting eliminates soldering of copper or having to thread galvanized pipe. This also works for galvanized pipe except you cut the pipe with a hack saw.
Cut the copper pipe with a copper pipe cutter and then insert the compression T- fitting. Tighten the compression fitting with channel locks on either end of the compression fitting.
Install the irrigation shutoff valve using the instructions in Section 1.