Knocking Copper Hot Water Pipes in Winter
Regardless of whether or not it stops the banging, you should insulate your water pipes if they pass throught an unheated area. In fact, if it gets very cold in winter where you are, I'd insulate my hot AND my cold. Cold water pipes that are insulated are slightly less likely to freeze. Hot water pipes passing through an unheated area will put extra strain on the water heater as the pipes lose heat. Conserve energy and insulate those pipes, if the banging stops, awesome. If not, you may build up or hammering or other problems.