Lord Krishna is omniscient, which means that He knows the past, present, and the future.
“Arjuna, you and I have taken many births. I can remember all of them, but you cannot.” (Lord Krishna, Bhagavad-Gita 4.5)
“I completely know the past, the present, and the future. I also know all living beings, but no one really knows Me.” (Lord Krishna, Bhagavad-Gita 7.26)
Lord Krishna is stating that He can remember everything but we cannot. This is one of the differences between God and the living beings. God has a memory that is perfect and He can remember not just His own past appearances, but also mine, yours and all living beings. Lord Krishna knows exactly where and what all the living beings, including you and me were doing trillions of years ago. This is how great Lord Krishna (God) is.
Lord Krishna knows every moment of all His trillions of incarnations, and He also knows every moment of every living beings present and past lives.