what is the proper way to re-roof a home with exposed wood decking all around it ,so that nails will not protrudethrough the decking?
All roofing manufacturers require a certain size fastener (manual or pneumatic) shank size and head size. They also specify the minimum thickness of roof sheathing. This is primarily to resist wind blow off. 

Depending on where the installation is located, the minimum thickness of sheathing is either 1/2” or 5/8” (for high wind areas).

You can buy the correct size (shank diameter and head size) and specify “shorts” (1” long) so they don’t penetrate the decking. These “shorts” exceed the roofing manufacturers minimum penetration. 

If you use the wrong size fastener, you’ll void the warranty.