|The Diary was erased, but River's mind was not.|
Groundwork of speculation has been laid since "The Big Bang" first aired, in part because of one seemingly accidental plot hole: that River remembered the Doctor after the rebooted universe. But on his Twitter, Steven Moffat has suggested that there is more to that story than we've yet understood.
CFXSister asked the following question of Moffat:
"If the Dr was wiped from memory in the S5 finale, how did River know to give Amy the diary to help bring him back?"
And the head writer of the series responded accordingly, in great secret.
"Because of who she is. You see -- oops, almost said it!!"The mystery of River Song, of course, is rumored to soon come to an end, at least in part, in Episode 7 of Series 6.