Locke's argument begins from a deliberate separation of two questions usually run together, what makes a living organism, a man, the same biological entity over time, which he thought was mostly a matter of continuous physical life, and what makes a person, a thinking, self-aware being capable of considering itself the same thinking thing at different times and places, the same person over time, which he argued was an entirely different matter, settled not by sameness of substance but by sameness of consciousness, extended backward through memory to past actions and thoughts. On Locke's famous and deliberately provocative thought experiments, if a prince's consciousness, complete with all his memories, were somehow transferred into a cobbler's body, the resulting person would, on Locke's criterion, be the prince in every sense that matters for personal identity and moral responsibility, however strange this sounds when described in terms of substance or soul.
Derek Parfit took the underlying logic further still in the twentieth century, arguing through elaborate fission and teletransportation thought experiments that psychological continuity can hold in degrees and can even branch into more than one successor, which led him to the striking conclusion that strict personal identity might not be the thing that actually matters for survival, prudence, or moral concern; what matters, he argued, is psychological continuity and connectedness themselves, however they are realized, whether or not they add up to a single, unified, strictly identical person persisting throughout.