The following link is to John Tvedtnes' paper, "Baptism for the Dead in Early Christianity" from the book, The Temple in Time and Antiquity. It shows the ancient Christian evidence for the doctrine of baptism for the dead. It is a fascinating read. Tvedtnes' summary is rather apt:
Though most Christians stopped baptizing for the dead in the early centuries after Christ, documentary evidence makes it clear that the practice was known in various parts of the Mediterranean world and that it found ready acceptance in such areas as Egypt. The ordinance is especially attested in pseudepigraphic texts whose authorship is open to question; nevertheless, from their geographical distribution it seems that these documents were widely circulated among early Christian groups and therefore contain doctrines with which those Christians were familiar.