Grab a section of old chain and practice using your chain tool. You will soon find that point at which links pop but the pin stays inside the side-plate. If the pin is protruding very slightly inside, it will seat into the inner link when you re-assemble.
Use a bit of wire as a hook to give some slack in the chain as you fix it back together.
Putting pins back is a major PITA. Most chains have a few extra links, you should alway keep these for such emergencies. Take the pinless link out altogether and replace it with a link from your spares, with the pin in-place.
The easiest way is to use a master-link which needs no tool but that costs a little bit.