Knot them without a tight knot while you're working, and then if you want to, untie the knot and work in the loose ends. When my kids were little I had more than one "accident" where the knitting project got terrorized and the ends were lost, or nearly lost, but that area never quite looked the same after I fixed it...