If using MIG, I found it best to drill a hole into the bolt/stud, then fill that up with weld. As it shrinks, it reduces the bolt/stud diameter slightly. Then weld on a pimple or nut. Found this worked after several other attempts just welding to the end had failed and broke off.