Well it wouldn't be much of a game if Link rewound, had no memory of the things that changed, and ended up doing it again. ;)
Link's keeping of his memory could be attributed to his having the Ocarina of Time, or it could be part of a product of not being a Termina local. Why other things (like...