This method can be used when knitting a second leg (or part of a garment), which is to be joined to the first leg by a row of knitting. If you do not have a stitch holder or safety pin handy, or would prefer not to transfer stitches on and off the needle, there is a simple fix.
Take the needle holding the first leg, making sure the right side is facing you, and cast on the stitches for the second leg as shown above. Then work Row 1 of the second leg, ignore the first leg completely and simply continue with the second leg until the joining row is reached, then you can simply knit right across ALL the stitches on the needle.